diff options
author | ylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68> | 2015-03-08 10:10:01 +0000 |
---|---|---|
committer | ylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68> | 2015-03-08 10:10:01 +0000 |
commit | bde790d91fabd888c91a74e1de09876023a816a8 (patch) | |
tree | 8117c5698d33d265e7003434ead3b9e7f10ac632 /tables | |
parent | e4b0deef16a1eff7c01db072d7109e60767f6e51 (diff) | |
download | libapr-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.c | 3 |
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; ?? */ } |