diff options
author | hasso <hasso> | 2003-12-22 16:49:15 +0000 |
---|---|---|
committer | hasso <hasso> | 2003-12-22 16:49:15 +0000 |
commit | a2be3c0db267692f66def274bac2afdf1596e7fb (patch) | |
tree | 39ac9c7d5abec2a1b2a628400eb48cdb21767b5a /lib/linklist.c | |
parent | 546c6879466b185aadf1f78fcb392aee79838c83 (diff) | |
download | quagga-a2be3c0db267692f66def274bac2afdf1596e7fb.tar.bz2 quagga-a2be3c0db267692f66def274bac2afdf1596e7fb.tar.xz |
Revert my "microfix". It was caused by misreading code. Gilad is right as
always.
Diffstat (limited to 'lib/linklist.c')
-rw-r--r-- | lib/linklist.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/linklist.c b/lib/linklist.c index 9c1b297a..1c95da4a 100644 --- a/lib/linklist.c +++ b/lib/linklist.c @@ -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; |