You are right, my mistake.  The previous patch was the consistency
patch, but this one actually does what the subject says.  The motivation
behind it was the fact that rb trees *almost* support this and I can't
see any harm.  The same could be done for splay trees, but I found this
too intrusive without further feedback.


Thanks,
Franco

Index: tree.h
===================================================================
RCS file: /OpenBSD/src/sys/sys/tree.h,v
retrieving revision 1.13
diff -u -r1.13 tree.h
--- tree.h      9 Jul 2011 00:19:45 -0000       1.13
+++ tree.h      11 Jun 2013 05:15:50 -0000
@@ -594,7 +594,7 @@
        tmp = RB_ROOT(head);                                            \
        while (tmp) {                                                   \
                parent = tmp;                                           \
-               comp = (cmp)(elm, parent);                              \
+               comp = cmp(elm, parent);                                \
                if (comp < 0)                                           \
                        tmp = RB_LEFT(tmp, field);                      \
                else if (comp > 0)                                      \

Reply via email to