]> git.droids-corp.org - dpdk.git/blobdiff - lib/rib/rte_rib6.c
raw/cnxk_bphy: keep leading zero in device name
[dpdk.git] / lib / rib / rte_rib6.c
index 96424e9c9f4f37ebbfab5dabde210a9c43e14ae0..b00c7fbf5ab0b911fc1b1597eb24497498f328cc 100644 (file)
@@ -88,7 +88,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