static inline int item_watched(int i)
{
assert (i >= 0);
- assert (((size_t) i) < ((STATIC_ARRAY_SIZE (watch_items) + 1) * 32));
+ assert ((size_t) i < (STATIC_ARRAY_SIZE (watch_items) * 32));
return watch_items[i / 32] & FLAG (i);
}
static inline int item_summed(int i)
{
assert (i >= 0);
- assert (((size_t) i) < ((STATIC_ARRAY_SIZE (misc_items) + 1) * 32));
+ assert ((size_t) i < (STATIC_ARRAY_SIZE (misc_items) * 32));
return misc_items[i / 32] & FLAG (i);
}
static inline void watchlist_add (uint32_t *wl, int item)
{
assert (item >= 0);
- assert (item < ((WL_LEN + 1) * 32));
+ assert (item < WL_LEN * 32);
wl[item / 32] |= FLAG (item);
}
static inline void watchlist_remove (uint32_t *wl, int item)
{
assert (item >= 0);
- assert (item < ((WL_LEN + 1) * 32));
+ assert (item < WL_LEN * 32);
wl[item / 32] &= ~FLAG (item);
}