Author: cem Date: Sat Apr 6 21:56:24 2019 New Revision: 345993 URL: https://svnweb.freebsd.org/changeset/base/345993
Log: 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). Modified: head/sys/kern/subr_pctrie.c Modified: head/sys/kern/subr_pctrie.c ============================================================================== --- head/sys/kern/subr_pctrie.c Sat Apr 6 21:53:46 2019 (r345992) +++ head/sys/kern/subr_pctrie.c Sat Apr 6 21:56:24 2019 (r345993) @@ -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) _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"