Skip to content

Commit

Permalink
stop clang from whining about asserts
Browse files Browse the repository at this point in the history
we now use up to exactly clsid 255, which is the max size of a byte so the
assertion can't fail.
  • Loading branch information
dormando committed Apr 25, 2015
1 parent 5ddccfe commit f0358c0
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions items.c
Expand Up @@ -271,7 +271,6 @@ bool item_size_ok(const size_t nkey, const int flags, const int nbytes) {

static void do_item_link_q(item *it) { /* item is the new head */
item **head, **tail;
assert(it->slabs_clsid < LARGEST_ID);
assert((it->it_flags & ITEM_SLABBED) == 0);

head = &heads[it->slabs_clsid];
Expand All @@ -295,7 +294,6 @@ static void item_link_q(item *it) {

static void do_item_unlink_q(item *it) {
item **head, **tail;
assert(it->slabs_clsid < LARGEST_ID);
head = &heads[it->slabs_clsid];
tail = &tails[it->slabs_clsid];

Expand Down Expand Up @@ -1094,7 +1092,6 @@ int init_lru_maintainer(void) {

static void crawler_link_q(item *it) { /* item is the new tail */
item **head, **tail;
assert(it->slabs_clsid < LARGEST_ID);
assert(it->it_flags == 1);
assert(it->nbytes == 0);

Expand All @@ -1116,7 +1113,6 @@ static void crawler_link_q(item *it) { /* item is the new tail */

static void crawler_unlink_q(item *it) {
item **head, **tail;
assert(it->slabs_clsid < LARGEST_ID);
head = &heads[it->slabs_clsid];
tail = &tails[it->slabs_clsid];

Expand Down

0 comments on commit f0358c0

Please sign in to comment.