summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4afb773)
raw | patch | inline | side by side (parent: 4afb773)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 23 Jul 2016 13:30:44 +0000 (15:30 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 23 Jul 2016 13:35:16 +0000 (15:35 +0200) |
src/madwifi.c | patch | blob | history |
diff --git a/src/madwifi.c b/src/madwifi.c
index 949724eba0e6b1bcc8c5417a837ef5266dec3f10..6eb12dd26d275e287746199b32eeff2ee9ff7ba5 100644 (file)
--- a/src/madwifi.c
+++ b/src/madwifi.c
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);
}