X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Frib%2Frte_rib6.c;h=042ac1f090bf57c12198862fbf50f0994a02b54d;hb=1e1bfd078e581c155cd5a2b5c9191d87714dfc93;hp=96424e9c9f4f37ebbfab5dabde210a9c43e14ae0;hpb=03b8372a9a73a6b3dce4ce6b447ea37c398a4685;p=dpdk.git diff --git a/lib/rib/rte_rib6.c b/lib/rib/rte_rib6.c index 96424e9c9f..042ac1f090 100644 --- a/lib/rib/rte_rib6.c +++ b/lib/rib/rte_rib6.c @@ -6,12 +6,10 @@ #include #include -#include #include #include #include #include -#include #include #include @@ -88,7 +86,7 @@ get_dir(const uint8_t ip[RTE_RIB6_IPV6_ADDR_SIZE], uint8_t depth) * is incremented in blocks of 8 (1 byte). This means the last * 3 bits are irrelevant to what the index of ip should be. */ - index = (depth & (UINT8_MAX - 1)) / CHAR_BIT; + index = (depth & INT8_MAX) / CHAR_BIT; /* * msk is the bitmask used to extract the bit used to decide the @@ -199,7 +197,7 @@ rte_rib6_lookup_exact(struct rte_rib6 *rib, } /* - * Traverses on subtree and retreeves more specific routes + * Traverses on subtree and retrieves more specific routes * for a given in args ip/depth prefix * last = NULL means the first invocation */