*/
last = MASK_LEN_TO_IDX(arr->len);
last_mod = MASK_LEN_TO_MOD(arr->len);
- last_msk = ~(-1ULL << last_mod);
+ last_msk = ~(UINT64_MAX << last_mod);
for (msk_idx = first; msk_idx < msk->n_masks; msk_idx++) {
uint64_t cur_msk, lookahead_msk;
first_mod = MASK_LEN_TO_MOD(start);
/* we're going backwards, so mask must start from the top */
ignore_msk = first_mod == MASK_ALIGN - 1 ?
- -1ULL : /* prevent overflow */
- ~(-1ULL << (first_mod + 1));
+ UINT64_MAX : /* prevent overflow */
+ ~(UINT64_MAX << (first_mod + 1));
/* go backwards, include zero */
msk_idx = first;
* no runs in the space we've lookbehind-scanned
* as well, so skip that on next iteration.
*/
- ignore_msk = -1ULL << need;
+ ignore_msk = UINT64_MAX << need;
msk_idx = lookbehind_idx;
break;
}
first_mod = MASK_LEN_TO_MOD(start);
/* we're going backwards, so mask must start from the top */
ignore_msk = first_mod == MASK_ALIGN - 1 ?
- -1ULL : /* prevent overflow */
- ~(-1ULL << (first_mod + 1));
+ UINT64_MAX : /* prevent overflow */
+ ~(UINT64_MAX << (first_mod + 1));
/* go backwards, include zero */
idx = first;