bistring: avoid gcc -Wsign-compare

Appease gcc after after r355377, which broke gcc builds.

Reviewed by:	dougm
MFC with:	r355377
Differential Revision:	https://reviews.freebsd.org/D22682
This commit is contained in:
Ryan Libby 2019-12-04 20:15:17 +00:00
parent ed2f945a39
commit ec66aadd2b

View File

@ -306,7 +306,7 @@ bit_ffs_area_at(bitstr_t *_bitstr, int _start, int _nbits, int _size,
while ((_test & (_test + 1)) != 0 && _b-- > 0)
_test |= _test >> (((_size - 1) >> _b) + 1) / 2;
/* Find the start of the first 0-area in _test. */
_offset = (~_test == 0) ? _BITSTR_BITS :
_offset = (~_test == 0) ? (int)_BITSTR_BITS :
ffsl(~_test) - 1;
_value = (_curbitstr - _bitstr) * _BITSTR_BITS +
_offset;
@ -353,7 +353,7 @@ bit_ffc_area_at(bitstr_t *_bitstr, int _start, int _nbits, int _size,
while ((_test & (_test + 1)) != 0 && _b-- > 0)
_test |= _test >> (((_size - 1) >> _b) + 1) / 2;
/* Find the start of the first 0-area in _test. */
_offset = (~_test == 0) ? _BITSTR_BITS :
_offset = (~_test == 0) ? (int)_BITSTR_BITS :
ffsl(~_test) - 1;
_value = (_curbitstr - _bitstr) * _BITSTR_BITS +
_offset;