mirror of
https://github.com/opnsense/src.git
synced 2026-02-23 18:00:31 -05:00
bitstring: fix ff_area() when start!=0
commit84e2ae64c5introduced 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:84e2ae64c5vm_reserv: use enhanced bitstring for popmaps Differential Revision: https://reviews.freebsd.org/D35157
This commit is contained in:
parent
1cb8e38e4b
commit
6e7a585348
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue