apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1611466 - /apr/apr/trunk/tables/apr_skiplist.c
Date Thu, 17 Jul 2014 20:26:30 GMT
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) {
         /*



Mime
View raw message