summaryrefslogtreecommitdiff
path: root/lib/skiplist.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/skiplist.c')
-rw-r--r--lib/skiplist.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/skiplist.c b/lib/skiplist.c
index a36bf47139..3933429c3b 100644
--- a/lib/skiplist.c
+++ b/lib/skiplist.c
@@ -183,8 +183,8 @@ int skiplist_insert(register struct skiplist *l, register void *key,
/* DEBUG */
if (!key) {
- flog_err(LIB_ERR_DEVELOPMENT, "%s: key is 0, value is %p",
- __func__, value);
+ flog_err(EC_LIB_DEVELOPMENT, "%s: key is 0, value is %p",
+ __func__, value);
}
p = l->header;
@@ -202,6 +202,7 @@ int skiplist_insert(register struct skiplist *l, register void *key,
}
k = randomLevel();
+ assert(k >= 0);
if (k > l->level) {
k = ++l->level;
update[k] = l->header;