kern/subr_pctrie: Fix mismatched signedness in assertion comparison

'tos' is an index into an array and never holds a negative value.  Correct
its signedness to match PCTRIE_LIMIT, which it is compared to in assertions.

No functional change (kills a warning).
This commit is contained in:
Conrad Meyer 2019-04-06 21:56:24 +00:00
parent 80405bcf79
commit d1139b5286

View File

@ -385,7 +385,8 @@ pctrie_lookup_ge(struct pctrie *ptree, uint64_t index)
#ifdef INVARIANTS
int loops = 0;
#endif
int slot, tos;
unsigned tos;
int slot;
node = pctrie_getroot(ptree);
if (node == NULL)
@ -496,7 +497,8 @@ pctrie_lookup_le(struct pctrie *ptree, uint64_t index)
#ifdef INVARIANTS
int loops = 0;
#endif
int slot, tos;
unsigned tos;
int slot;
node = pctrie_getroot(ptree);
if (node == NULL)