summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2012-01-11 00:06:48 +0000
committerbluhm <bluhm@openbsd.org>2012-01-11 00:06:48 +0000
commitf59502530092f8cfa67a8df87efd1a4d66acc3d1 (patch)
tree1f8602a3a345250f0e46b512a0368e9546390c85
parentReplace the only occurrence of the obscure macro SLIST_FOREACH_PREVPTR. (diff)
downloadwireguard-openbsd-f59502530092f8cfa67a8df87efd1a4d66acc3d1.tar.xz
wireguard-openbsd-f59502530092f8cfa67a8df87efd1a4d66acc3d1.zip
Remove SLIST_FOREACH_PREVPTR from src tree, it is not used anymore.
ok guenther@ deraadt@
-rw-r--r--distrib/sets/lists/comp/mi1
-rw-r--r--share/man/man3/Makefile4
-rw-r--r--share/man/man3/queue.315
-rw-r--r--sys/sys/queue.h7
4 files changed, 5 insertions, 22 deletions
diff --git a/distrib/sets/lists/comp/mi b/distrib/sets/lists/comp/mi
index 6dbddb51716..463b9fa1cf7 100644
--- a/distrib/sets/lists/comp/mi
+++ b/distrib/sets/lists/comp/mi
@@ -2926,7 +2926,6 @@
./usr/share/man/man3/SLIST_ENTRY.3
./usr/share/man/man3/SLIST_FIRST.3
./usr/share/man/man3/SLIST_FOREACH.3
-./usr/share/man/man3/SLIST_FOREACH_PREVPTR.3
./usr/share/man/man3/SLIST_FOREACH_SAFE.3
./usr/share/man/man3/SLIST_HEAD.3
./usr/share/man/man3/SLIST_HEAD_INITIALIZER.3
diff --git a/share/man/man3/Makefile b/share/man/man3/Makefile
index 298213a8a5f..fe2c51d0e14 100644
--- a/share/man/man3/Makefile
+++ b/share/man/man3/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.23 2011/07/09 08:42:38 jmc Exp $
+# $OpenBSD: Makefile,v 1.24 2012/01/11 00:06:48 bluhm Exp $
# @(#)Makefile 8.2 (Berkeley) 12/13/93
MAN= assert.3 bitstring.3 CMSG_DATA.3 dlfcn.3 dl_iterate_phdr.3 end.3 \
@@ -15,7 +15,7 @@ MLINKS+=queue.3 SLIST_ENTRY.3 queue.3 SLIST_HEAD.3 \
queue.3 SLIST_HEAD_INITIALIZER.3 queue.3 SLIST_FIRST.3 \
queue.3 SLIST_NEXT.3 queue.3 SLIST_END.3 queue.3 SLIST_EMPTY.3 \
queue.3 SLIST_FOREACH.3 queue.3 SLIST_FOREACH_SAFE.3 \
- queue.3 SLIST_FOREACH_PREVPTR.3 queue.3 SLIST_INIT.3 \
+ queue.3 SLIST_INIT.3 \
queue.3 SLIST_INSERT_AFTER.3 queue.3 SLIST_INSERT_HEAD.3 \
queue.3 SLIST_REMOVE_HEAD.3 queue.3 SLIST_REMOVE_NEXT.3 \
queue.3 SLIST_REMOVE.3
diff --git a/share/man/man3/queue.3 b/share/man/man3/queue.3
index 7ac90b85f01..dac05ac707f 100644
--- a/share/man/man3/queue.3
+++ b/share/man/man3/queue.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: queue.3,v 1.52 2011/07/09 08:43:01 jmc Exp $
+.\" $OpenBSD: queue.3,v 1.53 2012/01/11 00:06:48 bluhm 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.
@@ -30,7 +30,7 @@
.\"
.\" @(#)queue.3 8.1 (Berkeley) 12/13/93
.\"
-.Dd $Mdocdate: July 9 2011 $
+.Dd $Mdocdate: January 11 2012 $
.Dt QUEUE 3
.Os
.Sh NAME
@@ -43,7 +43,6 @@
.Nm SLIST_EMPTY ,
.Nm SLIST_FOREACH ,
.Nm SLIST_FOREACH_SAFE ,
-.Nm SLIST_FOREACH_PREVPTR ,
.Nm SLIST_INIT ,
.Nm SLIST_INSERT_AFTER ,
.Nm SLIST_INSERT_HEAD ,
@@ -136,7 +135,6 @@
.Fn SLIST_EMPTY "SLIST_HEAD *head"
.Fn SLIST_FOREACH "VARNAME" "SLIST_HEAD *head" "SLIST_ENTRY NAME"
.Fn SLIST_FOREACH_SAFE "VARNAME" "SLIST_HEAD *head" "SLIST_ENTRY NAME" "TEMP_VARNAME"
-.Fn SLIST_FOREACH_PREVPTR "VARNAME" "VARNAMEP" "SLIST_HEAD *head" "SLIST_ENTRY NAME"
.Ft void
.Fn SLIST_INIT "SLIST_HEAD *head"
.Ft void
@@ -509,15 +507,6 @@ it is permitted to remove var as well
as free it from within the loop safely without interfering with the traversal.
.Pp
The
-.Fn SLIST_FOREACH_PREVPTR
-macro is similar to
-.Fn SLIST_FOREACH
-except that it stores a pointer to the previous element in
-.Fa VARNAMEP .
-This provides access to the previous element while traversing the list,
-as one would have with a doubly-linked list.
-.Pp
-The
.Fn SLIST_EMPTY
macro should be used to check whether a simple list is empty.
.Sh SINGLY-LINKED LIST EXAMPLE
diff --git a/sys/sys/queue.h b/sys/sys/queue.h
index 7bb159a129e..fb23a72f759 100644
--- a/sys/sys/queue.h
+++ b/sys/sys/queue.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: queue.h,v 1.34 2011/07/09 00:19:45 pirofti Exp $ */
+/* $OpenBSD: queue.h,v 1.35 2012/01/11 00:06:48 bluhm Exp $ */
/* $NetBSD: queue.h,v 1.11 1996/05/16 05:17:14 mycroft Exp $ */
/*
@@ -122,11 +122,6 @@ struct { \
(var) && ((tvar) = SLIST_NEXT(var, field), 1); \
(var) = (tvar))
-#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \
- for ((varp) = &SLIST_FIRST((head)); \
- ((var) = *(varp)) != SLIST_END(head); \
- (varp) = &SLIST_NEXT((var), field))
-
/*
* Singly-linked List functions.
*/