aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Moore <dougm@FreeBSD.org>2022-10-03 05:15:21 +0000
committerDoug Moore <dougm@FreeBSD.org>2022-10-24 00:43:46 +0000
commitc1d077b80609953601922348be950368e01f2c8a (patch)
tree806c1cd48ad471fc6c92f6e846077e68ee6f6da2
parentd0fb642b64571de87ae444c960b3d21c3d0ed79d (diff)
downloadsrc-c1d077b80609953601922348be950368e01f2c8a.tar.gz
src-c1d077b80609953601922348be950368e01f2c8a.zip
Fix LINT build after 368ee2f86a0f4f6
Reported by: jenkins Fixes: 368ee2f86a0f4f6 (cherry picked from commit ffbc2a58b13a9239269e661fe23f86c587cc7638)
-rw-r--r--sys/sys/tree.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/sys/tree.h b/sys/sys/tree.h
index 7aa00bd53fd7..0fb3cf94eebc 100644
--- a/sys/sys/tree.h
+++ b/sys/sys/tree.h
@@ -920,11 +920,11 @@ name##_RB_NEXT(struct type *elm) \
}
#if defined(_KERNEL) && defined(DIAGNOSTIC)
-#define _RB_ORDER_CHECK(lo, hi) do { \
- KASSERT(cmp(lo, hi) < 0, "out of order insertion"); \
+#define _RB_ORDER_CHECK(cmp, lo, hi) do { \
+ KASSERT((cmp)(lo, hi) < 0, ("out of order insertion")); \
} while (0)
#else
-#define _RB_ORDER_CHECK(elm, next) do {} while (0)
+#define _RB_ORDER_CHECK(cmp, lo, hi) do {} while (0)
#endif
#define RB_GENERATE_INSERT_NEXT(name, type, field, cmp, attr) \
@@ -936,9 +936,9 @@ name##_RB_INSERT_NEXT(struct name *head, \
struct type *tmp; \
struct type **tmpp = &RB_RIGHT(elm, field); \
\
- _RB_ORDER_CHECK(elm, next); \
+ _RB_ORDER_CHECK(cmp, elm, next); \
if (name##_RB_NEXT(elm) != NULL) \
- _RB_ORDER_CHECK(next, name##_RB_NEXT(elm)); \
+ _RB_ORDER_CHECK(cmp, next, name##_RB_NEXT(elm)); \
while ((tmp = *tmpp) != NULL) { \
elm = tmp; \
tmpp = &RB_LEFT(elm, field); \
@@ -973,9 +973,9 @@ name##_RB_INSERT_PREV(struct name *head, \
struct type *tmp; \
struct type **tmpp = &RB_LEFT(elm, field); \
\
- _RB_ORDER_CHECK(prev, elm); \
+ _RB_ORDER_CHECK(cmp, prev, elm); \
if (name##_RB_PREV(elm) != NULL) \
- _RB_ORDER_CHECK(name##_RB_PREV(elm), prev); \
+ _RB_ORDER_CHECK(cmp, name##_RB_PREV(elm), prev); \
while ((tmp = *tmpp) != NULL) { \
elm = tmp; \
tmpp = &RB_RIGHT(elm, field); \