You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by yl...@apache.org on 2014/07/17 22:26:30 UTC
svn commit: r1611466 - /apr/apr/trunk/tables/apr_skiplist.c
Author: ylavic
Date: Thu Jul 17 20:26:30 2014
New Revision: 1611466
URL: http://svn.apache.org/r1611466
Log:
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).
Modified:
apr/apr/trunk/tables/apr_skiplist.c
Modified: apr/apr/trunk/tables/apr_skiplist.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/tables/apr_skiplist.c?rev=1611466&r1=1611465&r2=1611466&view=diff
==============================================================================
--- apr/apr/trunk/tables/apr_skiplist.c (original)
+++ apr/apr/trunk/tables/apr_skiplist.c Thu Jul 17 20:26:30 2014
@@ -482,11 +482,9 @@ static apr_skiplistnode *insert_compare(
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) {
/*