mirror of
https://github.com/opnsense/src.git
synced 2026-04-29 18:32:49 -04:00
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:
parent
80405bcf79
commit
d1139b5286
1 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue