diff options
| author | Ruben Kerkhof <ruben@rubenkerkhof.com> | 2020-03-10 16:50:03 +0100 |
|---|---|---|
| committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | 2020-03-10 16:53:13 +0100 |
| commit | 1e20238af5bcfa58ffb70f321e56f510a6ab33d9 (patch) | |
| tree | 0cd2bd36d2cfd736aef59fafa6afa0c7fbc500d5 /lib/skiplist.c | |
| parent | 7cda3a87d130c8f18764ec2e4c986bf30ae25416 (diff) | |
treewide: fix some issues found with -Werror=undef
Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
Diffstat (limited to 'lib/skiplist.c')
| -rw-r--r-- | lib/skiplist.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/skiplist.c b/lib/skiplist.c index 67cc1ab378..d955c6eb9e 100644 --- a/lib/skiplist.c +++ b/lib/skiplist.c @@ -211,12 +211,12 @@ int skiplist_insert(register struct skiplist *l, register void *key, q = newNodeOfLevel(k); q->key = key; q->value = value; -#if SKIPLIST_0TIMER_DEBUG +#ifdef SKIPLIST_0TIMER_DEBUG q->flags = SKIPLIST_NODE_FLAG_INSERTED; /* debug */ #endif ++(l->stats->forward[k]); -#if SKIPLIST_DEBUG +#ifdef SKIPLIST_DEBUG zlog_debug("%s: incremented stats @%p:%d, now %ld", __func__, l, k, l->stats->forward[k] - (struct skiplistnode *)NULL); #endif @@ -281,7 +281,7 @@ int skiplist_delete(register struct skiplist *l, register void *key, /* * found node to delete */ -#if SKIPLIST_0TIMER_DEBUG +#ifdef SKIPLIST_0TIMER_DEBUG q->flags &= ~SKIPLIST_NODE_FLAG_INSERTED; #endif /* @@ -300,7 +300,7 @@ int skiplist_delete(register struct skiplist *l, register void *key, p->forward[k] = q->forward[k]; } --(l->stats->forward[k - 1]); -#if SKIPLIST_DEBUG +#ifdef SKIPLIST_DEBUG zlog_debug("%s: decremented stats @%p:%d, now %ld", __func__, l, k - 1, l->stats->forward[k - 1] @@ -549,7 +549,7 @@ int skiplist_delete_first(register struct skiplist *l) } } -#if SKIPLIST_0TIMER_DEBUG +#ifdef SKIPLIST_0TIMER_DEBUG q->flags &= ~SKIPLIST_NODE_FLAG_INSERTED; #endif /* @@ -561,7 +561,7 @@ int skiplist_delete_first(register struct skiplist *l) } --(l->stats->forward[nodelevel]); -#if SKIPLIST_DEBUG +#ifdef SKIPLIST_DEBUG zlog_debug("%s: decremented stats @%p:%d, now %ld", __func__, l, nodelevel, l->stats->forward[nodelevel] - (struct skiplistnode *)NULL); |
