summaryrefslogtreecommitdiff
path: root/tables
diff options
context:
space:
mode:
authorylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2015-03-08 10:10:01 +0000
committerylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2015-03-08 10:10:01 +0000
commitbde790d91fabd888c91a74e1de09876023a816a8 (patch)
tree8117c5698d33d265e7003434ead3b9e7f10ac632 /tables
parente4b0deef16a1eff7c01db072d7109e60767f6e51 (diff)
downloadlibapr-bde790d91fabd888c91a74e1de09876023a816a8.tar.gz
skiplist:
When removing the last node, we have top = bottom = NULL, and must set topend = bottomend = NULL too. Also fix test from r1664471 according to r1664911. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1664958 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tables')
-rw-r--r--tables/apr_skiplist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tables/apr_skiplist.c b/tables/apr_skiplist.c
index acaec16ba..2734fbad5 100644
--- a/tables/apr_skiplist.c
+++ b/tables/apr_skiplist.c
@@ -606,7 +606,8 @@ static int skiplisti_remove(apr_skiplist *sl, apr_skiplistnode *m, apr_skiplist_
sl->height--;
}
if (!sl->top) {
- sl->bottom = NULL;
+ sl->bottom = sl->bottomend = NULL;
+ sl->topend = NULL;
}
return sl->height; /* return 1; ?? */
}