bitstring: fix ff_area() when start!=0
commit84e2ae64c5
introduced an error in the ff*_area_at functions for nonzero start parameters when the bit range sought was found immediately. It mistakenly replaced '_value = _start' with '_value = 0' in initialization. Undo that mistake. Reported by: markj Reviewed by: markj Tested by: markj Fixes:84e2ae64c5
vm_reserv: use enhanced bitstring for popmaps Differential Revision: https://reviews.freebsd.org/D35157
This commit is contained in:
parent
1cb8e38e4b
commit
6e7a585348
@ -305,7 +305,7 @@ bit_ff_area_at(bitstr_t *_bitstr, int _start, int _nbits, int _size,
|
||||
|
||||
_mask = _match ? _BITSTR_MASK : 0;
|
||||
_maxshft = _bit_idx(_size - 1) == 0 ? _size : (int)_BITSTR_BITS;
|
||||
_value = 0;
|
||||
_value = _start;
|
||||
_curbitstr = _bitstr + _bit_idx(_start);
|
||||
_test = ~(_BITSTR_MASK << _bit_offset(_start));
|
||||
for (_last = _size - 1, _test |= _mask ^ *_curbitstr;
|
||||
|
Loading…
Reference in New Issue
Block a user