bitcnt = bitno % BITSET_WORD_BITS;
bitoff = windex * BITSET_WORD_BITS;
- for (; windex != ~0U; windex--, bitoff -= BITSET_WORD_BITS,
- bitcnt = BITSET_WORD_BITS - 1)
+ do
{
word = srcp[windex] << (BITSET_WORD_BITS - 1 - bitcnt);
for (; word; bitcnt--)
}
word <<= 1;
}
+ bitoff -= BITSET_WORD_BITS;
+ bitcnt = BITSET_WORD_BITS - 1;
}
+ while (windex--);
*next = n_bits - (bitoff + 1);
return count;
last_bit = ABITSET_N_BITS (dst) % BITSET_WORD_BITS;
if (last_bit)
ABITSET_WORDS (dst)[dst->b.csize - 1] &=
- (bitset_word) ((1 << last_bit) - 1);
+ ((bitset_word) 1 << last_bit) - 1;
}
break;
case BITSET_OP_ONES:
- memset (dstp, ~0, bytes);
+ memset (dstp, -1, bytes);
abitset_unused_clear (dst);
break;