Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys avoid generating compiler warnings; reported by des@...
details: https://anonhg.NetBSD.org/src/rev/21764c8e8a33
branches: trunk
changeset: 560116:21764c8e8a33
user: provos <provos%NetBSD.org@localhost>
date: Sun Mar 28 19:38:30 2004 +0000
description:
avoid generating compiler warnings; reported by des%des.no@localhost; solution
suggested by frantzen%openbsd.org@localhost
diffstat:
sys/sys/tree.h | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (43 lines):
diff -r 32b230f25838 -r 21764c8e8a33 sys/sys/tree.h
--- a/sys/sys/tree.h Sun Mar 28 19:35:13 2004 +0000
+++ b/sys/sys/tree.h Sun Mar 28 19:38:30 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.h,v 1.7 2004/01/24 21:59:47 dbj Exp $ */
+/* $NetBSD: tree.h,v 1.8 2004/03/28 19:38:30 provos Exp $ */
/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */
/*
* Copyright 2002 Niels Provos <provos%citi.umich.edu@localhost>
@@ -380,7 +380,7 @@
struct type *name##_RB_REMOVE(struct name *, struct type *); \
struct type *name##_RB_INSERT(struct name *, struct type *); \
struct type *name##_RB_FIND(struct name *, struct type *); \
-struct type *name##_RB_NEXT(struct name *, struct type *); \
+struct type *name##_RB_NEXT(struct type *); \
struct type *name##_RB_MINMAX(struct name *, int); \
\
@@ -628,7 +628,7 @@
\
/* ARGSUSED */ \
struct type * \
-name##_RB_NEXT(struct name *head, struct type *elm) \
+name##_RB_NEXT(struct type *elm) \
{ \
if (RB_RIGHT(elm, field)) { \
elm = RB_RIGHT(elm, field); \
@@ -669,13 +669,13 @@
#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y)
#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y)
#define RB_FIND(name, x, y) name##_RB_FIND(x, y)
-#define RB_NEXT(name, x, y) name##_RB_NEXT(x, y)
+#define RB_NEXT(name, x, y) name##_RB_NEXT(y)
#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF)
#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF)
#define RB_FOREACH(x, name, head) \
for ((x) = RB_MIN(name, head); \
(x) != NULL; \
- (x) = name##_RB_NEXT(head, x))
+ (x) = name##_RB_NEXT(x))
#endif /* _SYS_TREE_H_ */
Home |
Main Index |
Thread Index |
Old Index