summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/skiplist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/skiplist.c b/lib/skiplist.c
index a36bf47139..585cf859e5 100644
--- a/lib/skiplist.c
+++ b/lib/skiplist.c
@@ -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;