summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2007-10-26 16:37:43 +1000
committerDamien Miller <djm@mindrot.org>2007-10-26 16:37:43 +1000
commit88aa4e3d61baebe5db400000f9475f1608054b49 (patch)
tree06a27718a3ab4922d543100368b559cc1b08c0fd
parent2f715eeb5cc2ba730822ac04833408ab7a0696f4 (diff)
- frantzen@@cvs.openbsd.org 2004/04/24 18:11:46
[openbsd-compat/tree.h] sync to Niels Provos' version. avoid unused variable warning in RB_NEXT()
-rw-r--r--ChangeLog6
-rw-r--r--openbsd-compat/sys-tree.h10
2 files changed, 10 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 4eecb45a2..395b0accc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -87,6 +87,10 @@
87 [openbsd-compat/base64.c] 87 [openbsd-compat/base64.c]
88 remove calls to abort(3) that can't happen anyway; from 88 remove calls to abort(3) that can't happen anyway; from
89 <bret dot lambert at gmail.com>; ok millert@ deraadt@ 89 <bret dot lambert at gmail.com>; ok millert@ deraadt@
90 - frantzen@@cvs.openbsd.org 2004/04/24 18:11:46
91 [openbsd-compat/tree.h]
92 sync to Niels Provos' version. avoid unused variable warning in
93 RB_NEXT()
90 - (djm) [regress/sftp-cmds.sh] 94 - (djm) [regress/sftp-cmds.sh]
91 Use more restrictive glob to pick up test files from /bin - some platforms 95 Use more restrictive glob to pick up test files from /bin - some platforms
92 ship broken symlinks there which could spoil the test. 96 ship broken symlinks there which could spoil the test.
@@ -3363,4 +3367,4 @@
3363 OpenServer 6 and add osr5bigcrypt support so when someone migrates 3367 OpenServer 6 and add osr5bigcrypt support so when someone migrates
3364 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 3368 passwords between UnixWare and OpenServer they will still work. OK dtucker@
3365 3369
3366$Id: ChangeLog,v 1.4783 2007/10/26 06:26:46 djm Exp $ 3370$Id: ChangeLog,v 1.4784 2007/10/26 06:37:43 djm Exp $
diff --git a/openbsd-compat/sys-tree.h b/openbsd-compat/sys-tree.h
index c80b90b21..771248037 100644
--- a/openbsd-compat/sys-tree.h
+++ b/openbsd-compat/sys-tree.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */ 1/* $OpenBSD: tree.h,v 1.8 2004/04/24 18:11:46 frantzen Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * All rights reserved. 4 * All rights reserved.
@@ -381,7 +381,7 @@ void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
381struct type *name##_RB_REMOVE(struct name *, struct type *); \ 381struct type *name##_RB_REMOVE(struct name *, struct type *); \
382struct type *name##_RB_INSERT(struct name *, struct type *); \ 382struct type *name##_RB_INSERT(struct name *, struct type *); \
383struct type *name##_RB_FIND(struct name *, struct type *); \ 383struct type *name##_RB_FIND(struct name *, struct type *); \
384struct type *name##_RB_NEXT(struct name *, struct type *); \ 384struct type *name##_RB_NEXT(struct type *); \
385struct type *name##_RB_MINMAX(struct name *, int); \ 385struct type *name##_RB_MINMAX(struct name *, int); \
386 \ 386 \
387 387
@@ -626,7 +626,7 @@ name##_RB_FIND(struct name *head, struct type *elm) \
626} \ 626} \
627 \ 627 \
628struct type * \ 628struct type * \
629name##_RB_NEXT(struct name *head, struct type *elm) \ 629name##_RB_NEXT(struct type *elm) \
630{ \ 630{ \
631 if (RB_RIGHT(elm, field)) { \ 631 if (RB_RIGHT(elm, field)) { \
632 elm = RB_RIGHT(elm, field); \ 632 elm = RB_RIGHT(elm, field); \
@@ -667,13 +667,13 @@ name##_RB_MINMAX(struct name *head, int val) \
667#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y) 667#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y)
668#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y) 668#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y)
669#define RB_FIND(name, x, y) name##_RB_FIND(x, y) 669#define RB_FIND(name, x, y) name##_RB_FIND(x, y)
670#define RB_NEXT(name, x, y) name##_RB_NEXT(x, y) 670#define RB_NEXT(name, x, y) name##_RB_NEXT(y)
671#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF) 671#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF)
672#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF) 672#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF)
673 673
674#define RB_FOREACH(x, name, head) \ 674#define RB_FOREACH(x, name, head) \
675 for ((x) = RB_MIN(name, head); \ 675 for ((x) = RB_MIN(name, head); \
676 (x) != NULL; \ 676 (x) != NULL; \
677 (x) = name##_RB_NEXT(head, x)) 677 (x) = name##_RB_NEXT(x))
678 678
679#endif /* _SYS_TREE_H_ */ 679#endif /* _SYS_TREE_H_ */