]> git.puffer.fish Git - mirror/frr.git/commitdiff
Revert my "microfix". It was caused by misreading code. Gilad is right as
authorhasso <hasso>
Mon, 22 Dec 2003 16:49:15 +0000 (16:49 +0000)
committerhasso <hasso>
Mon, 22 Dec 2003 16:49:15 +0000 (16:49 +0000)
always.

ChangeLog
lib/linklist.c

index 635d47de5269307893e2c48474ea04d9ad66c240..02f28d4f15df93f9fcb3b2dc314f965b19147969 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-12-22 Hasso Tepper <hasso@estpak.ee>
+
+       * lib/linklist.c: Revert microfix I commited while reverting 
+         [quagga-dev 227]. Caused by misreading code.
+
 2003-12-21 Hasso Tepper <hasso@estpak.ee>
 
        * lib/linklist.c: Revert patch [quagga-dev 227]. listnode_add_sort()
index 9c1b297aeb605556f78b20e75261f96c3fe2b033..1c95da4a613083e299b8d393c37ef3b9c85df6e1 100644 (file)
@@ -85,10 +85,6 @@ listnode_add (struct list *list, void *val)
  * cmp function, insert a new node with the given val such that the
  * list remains sorted.  The new node is always inserted; there is no
  * notion of omitting duplicates.
- * 
- * XXX not sure this is right:
- * It is currently undefined whether new nodes for which cmp returns 0
- * should be added before or after any existing nodes.
  */
 void
 listnode_add_sort (struct list *list, void *val)
@@ -103,8 +99,7 @@ listnode_add_sort (struct list *list, void *val)
     {
       for (n = list->head; n; n = n->next)
        {
-         /* XXX should an "equal" node be inserted before or after? */
-         if ((*list->cmp) (val, n->data) <= 0)
+         if ((*list->cmp) (val, n->data) < 0)
            {       
              new->next = n;
              new->prev = n->prev;