diff options
author | Yann Ylavic <ylavic@apache.org> | 2014-07-17 20:26:30 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2014-07-17 20:26:30 +0000 |
commit | 9fd6562044834f0b641b3c6f957e0175e802281a (patch) | |
tree | 147ea77342e71038c05829868f9d64ea22d37aeb /tables | |
parent | 28003960315332de4ffead2fbf1083871af24de3 (diff) | |
download | apr-9fd6562044834f0b641b3c6f957e0175e802281a.tar.gz |
Follow up to r1611193: update the inserted node's top while looping should we
have to create more than one top node (eg. preheight > 0).
(the check on p != NULL can be omited since it can't be here).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1611466 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tables')
-rw-r--r-- | tables/apr_skiplist.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tables/apr_skiplist.c b/tables/apr_skiplist.c index 1a57d4ee7..a299b7b16 100644 --- a/tables/apr_skiplist.c +++ b/tables/apr_skiplist.c @@ -482,11 +482,9 @@ static apr_skiplistnode *insert_compare(apr_skiplist *sl, void *data, sl->top = sl->topend = tmp->prev = m; tmp->up = tmp->next = tmp->nextindex = tmp->previndex = NULL; tmp->down = p; - if (p) { - p->up = tmp; - } tmp->data = data; tmp->sl = sl; + p = p->up = tmp; } if (sl->index != NULL) { /* |