From d1139b52862ace110354ea899c469ea41d86d4e7 Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Sat, 6 Apr 2019 21:56:24 +0000 Subject: [PATCH] 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). --- sys/kern/subr_pctrie.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_pctrie.c b/sys/kern/subr_pctrie.c index ece2c1d75cf..822c5f88084 100644 --- a/sys/kern/subr_pctrie.c +++ b/sys/kern/subr_pctrie.c @@ -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)