summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/isakmpd/sysdep/linux/sys/queue.h4
-rw-r--r--share/man/man3/queue.36
-rw-r--r--sys/dev/std/sbp2.c8
-rw-r--r--sys/sys/queue.h4
-rw-r--r--usr.bin/ssh/sshconnect2.c4
-rw-r--r--usr.sbin/bgpd/rde_attr.c4
6 files changed, 15 insertions, 15 deletions
diff --git a/sbin/isakmpd/sysdep/linux/sys/queue.h b/sbin/isakmpd/sysdep/linux/sys/queue.h
index d7465bedfa8..3f0be6c73d8 100644
--- a/sbin/isakmpd/sysdep/linux/sys/queue.h
+++ b/sbin/isakmpd/sysdep/linux/sys/queue.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: queue.h,v 1.6 2003/09/02 18:11:15 ho Exp $ */
+/* $OpenBSD: queue.h,v 1.7 2004/04/08 16:08:21 henning Exp $ */
/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */
/*
@@ -317,7 +317,7 @@ struct { \
(var) != TAILQ_END(head); \
(var) = TAILQ_NEXT(var, field))
-#define TAILQ_FOREACH_REVERSE(var, head, field, headname) \
+#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
for((var) = TAILQ_LAST(head, headname); \
(var) != TAILQ_END(head); \
(var) = TAILQ_PREV(var, headname, field))
diff --git a/share/man/man3/queue.3 b/share/man/man3/queue.3
index b9d5832bb6b..6b74bb5f28b 100644
--- a/share/man/man3/queue.3
+++ b/share/man/man3/queue.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: queue.3,v 1.33 2003/12/16 21:08:20 millert Exp $
+.\" $OpenBSD: queue.3,v 1.34 2004/04/08 16:08:21 henning Exp $
.\" $NetBSD: queue.3,v 1.4 1995/07/03 00:25:36 mycroft Exp $
.\"
.\" Copyright (c) 1993 The Regents of the University of California.
@@ -200,7 +200,7 @@
.Ft "bool"
.Fn TAILQ_EMPTY "TAILQ_HEAD *head"
.Fn TAILQ_FOREACH "VARNAME" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME"
-.Fn TAILQ_FOREACH_REVERSE "VARNAME" "TAILQ_HEAD *head" "TAILQ_ENTRY NAME" "HEADNAME"
+.Fn TAILQ_FOREACH_REVERSE "VARNAME" "TAILQ_HEAD *head" "HEADNAME" "TAILQ_ENTRY NAME"
.Ft void
.Fn TAILQ_INIT "TAILQ_HEAD *head"
.Ft void
@@ -824,7 +824,7 @@ starts at the first element and proceeds towards the last.
starts at the last element and proceeds towards the first.
.Bd -literal -offset indent
TAILQ_FOREACH(np, &head, NAME)
-TAILQ_FOREACH_REVERSE(np, &head, NAME, HEADNAME)
+TAILQ_FOREACH_REVERSE(np, &head, HEADNAME, NAME)
.Ed
.Pp
The
diff --git a/sys/dev/std/sbp2.c b/sys/dev/std/sbp2.c
index b32cc275c04..c00d33ddcef 100644
--- a/sys/dev/std/sbp2.c
+++ b/sys/dev/std/sbp2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbp2.c,v 1.5 2004/02/15 02:38:38 tedu Exp $ */
+/* $OpenBSD: sbp2.c,v 1.6 2004/04/08 16:08:21 henning Exp $ */
/*
* Copyright (c) 2002 Thierry Deval. All rights reserved.
@@ -225,7 +225,7 @@ sbp2_elfind_last(struct sbp2_account *ac)
{
struct sbp2_orb_element *elm;
- TAILQ_FOREACH_REVERSE(elm, &sbp2_elm_head, elm_chain, sbp2_orb_tq) {
+ TAILQ_FOREACH_REVERSE(elm, &sbp2_elm_head, sbp2_orb_tq, elm_chain) {
if (elm->elm_ac == ac)
break;
}
@@ -379,8 +379,8 @@ sbp2_clean(struct fwnode_softc *sc, struct p1212_dir *unitdir, int logout)
if ((ac = sbp2_acfind(sc, lun)) != NULL) {
DPRINTF(("%s: clean lun %d\n", __func__, lun));
i = 0;
- TAILQ_FOREACH_REVERSE(elm, &sbp2_elm_head, elm_chain,
- sbp2_orb_tq) {
+ TAILQ_FOREACH_REVERSE(elm, &sbp2_elm_head, sbp2_orb_tq,
+ elm_chain) {
DPRINTF(("%s%d", i++?" ":"", i));
if (elm != NULL && elm->elm_ac == ac) {
TAILQ_REMOVE(&sbp2_elm_head, elm,
diff --git a/sys/sys/queue.h b/sys/sys/queue.h
index 7d5fb83c455..893e2fae298 100644
--- a/sys/sys/queue.h
+++ b/sys/sys/queue.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: queue.h,v 1.24 2003/12/16 21:08:20 millert Exp $ */
+/* $OpenBSD: queue.h,v 1.25 2004/04/08 16:08:21 henning Exp $ */
/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */
/*
@@ -326,7 +326,7 @@ struct { \
(var) != TAILQ_END(head); \
(var) = TAILQ_NEXT(var, field))
-#define TAILQ_FOREACH_REVERSE(var, head, field, headname) \
+#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
for((var) = TAILQ_LAST(head, headname); \
(var) != TAILQ_END(head); \
(var) = TAILQ_PREV(var, headname, field))
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index c20e02ab524..afee111a925 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/sshconnect2.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect2.c,v 1.135 2004/03/05 10:53:58 markus Exp $");
+RCSID("$OpenBSD: sshconnect2.c,v 1.136 2004/04/08 16:08:21 henning Exp $");
#include "ssh.h"
#include "ssh2.h"
@@ -456,7 +456,7 @@ input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt)
* moved to the end of the queue. this also avoids confusion by
* duplicate keys
*/
- TAILQ_FOREACH_REVERSE(id, &authctxt->keys, next, idlist) {
+ TAILQ_FOREACH_REVERSE(id, &authctxt->keys, idlist, next) {
if (key_equal(key, id->key)) {
sent = sign_and_send_pubkey(authctxt, id);
break;
diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c
index f85030b25aa..c04a4204cbe 100644
--- a/usr.sbin/bgpd/rde_attr.c
+++ b/usr.sbin/bgpd/rde_attr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_attr.c,v 1.26 2004/03/20 23:17:35 david Exp $ */
+/* $OpenBSD: rde_attr.c,v 1.27 2004/04/08 16:08:21 henning Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -488,7 +488,7 @@ attr_optadd(struct attr_flags *attr, u_int8_t flags, u_int8_t type,
a->data = NULL;
/* keep a sorted list */
- TAILQ_FOREACH_REVERSE(p, &attr->others, attr_l, attr_list) {
+ TAILQ_FOREACH_REVERSE(p, &attr->others, attr_list, attr_l) {
if (type == p->type) {
/* attribute only once allowed */
free(a->data);