summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/lst.lib/lstDeQueue.c
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>1999-12-18 21:58:07 +0000
committerespie <espie@openbsd.org>1999-12-18 21:58:07 +0000
commit6cbd4985083b77258bedf530b49cb5aa38e80d19 (patch)
tree057f495d592d31378361ce1e85af0176442ec6e4 /usr.bin/make/lst.lib/lstDeQueue.c
parentLst_DeQueue already checks for empty lists. (diff)
downloadwireguard-openbsd-6cbd4985083b77258bedf530b49cb5aa38e80d19.tar.xz
wireguard-openbsd-6cbd4985083b77258bedf530b49cb5aa38e80d19.zip
Nothing ever checks ReturnStatus on Lst_Insert, Lst_Append, Lst_AtFront,
Lst_AtEnd, Lst_Concat, Lst_Remove, Lst_Replace. Don't bother returning one.
Diffstat (limited to 'usr.bin/make/lst.lib/lstDeQueue.c')
-rw-r--r--usr.bin/make/lst.lib/lstDeQueue.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/usr.bin/make/lst.lib/lstDeQueue.c b/usr.bin/make/lst.lib/lstDeQueue.c
index 89495585268..ee8a12bbf2c 100644
--- a/usr.bin/make/lst.lib/lstDeQueue.c
+++ b/usr.bin/make/lst.lib/lstDeQueue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstDeQueue.c,v 1.5 1999/12/18 21:53:33 espie Exp $ */
+/* $OpenBSD: lstDeQueue.c,v 1.6 1999/12/18 21:58:08 espie Exp $ */
/* $NetBSD: lstDeQueue.c,v 1.5 1996/11/06 17:59:36 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstDeQueue.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstDeQueue.c,v 1.5 1999/12/18 21:53:33 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstDeQueue.c,v 1.6 1999/12/18 21:58:08 espie Exp $";
#endif
#endif /* not lint */
@@ -67,22 +67,18 @@ static char rcsid[] = "$OpenBSD: lstDeQueue.c,v 1.5 1999/12/18 21:53:33 espie Ex
*-----------------------------------------------------------------------
*/
ClientData
-Lst_DeQueue (l)
- Lst l;
+Lst_DeQueue(l)
+ Lst l;
{
- ClientData rd;
- register ListNode tln;
+ ClientData rd;
+ LstNode tln;
- tln = (ListNode) Lst_First (l);
- if (tln == NULL) {
- return ((ClientData) NULL);
- }
+ tln = Lst_First(l);
+ if (tln == NULL)
+ return (ClientData)NULL;
- rd = tln->datum;
- if (Lst_Remove (l, (LstNode)tln) == FAILURE) {
- return ((ClientData) NULL);
- } else {
- return (rd);
- }
+ rd = ((ListNode)tln)->datum;
+ Lst_Remove(l, tln);
+ return rd;
}