summaryrefslogtreecommitdiff
path: root/tables
diff options
context:
space:
mode:
authorylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2015-04-09 13:54:26 +0000
committerylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2015-04-09 13:54:26 +0000
commitb3b79f624111eca33cf54c3198469bfc58671fca (patch)
tree448c07248c155d261931395d83129ba445a8372b /tables
parentc9c361b9d20b79d7c2f152409509d1886e443e52 (diff)
downloadlibapr-b3b79f624111eca33cf54c3198469bfc58671fca.tar.gz
skiplist: follow up to r1664769.
Fix insert_compare() returning NULL on the very first insertion (top is NULL). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1672354 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tables')
-rw-r--r--tables/apr_skiplist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tables/apr_skiplist.c b/tables/apr_skiplist.c
index 4078dd03e..6075bb60c 100644
--- a/tables/apr_skiplist.c
+++ b/tables/apr_skiplist.c
@@ -543,6 +543,10 @@ static apr_skiplistnode *insert_compare(apr_skiplist *sl, void *data,
if (p) {
p->up = tmp;
}
+ else {
+ /* This sets ret to the bottom-most node we are inserting */
+ ret = tmp;
+ }
p = tmp;
}
if (sl->index != NULL) {