summaryrefslogtreecommitdiff
path: root/usr.bin/make/lst.lib/lstOpen.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2000-06-23 16:15:52 +0000
committerMarc Espie <espie@cvs.openbsd.org>2000-06-23 16:15:52 +0000
commit6d5c836a14118d8966a373381cc9baffc8053b05 (patch)
treea64365d82a4d9ae12d63957ef82c7fa9f7cba8fe /usr.bin/make/lst.lib/lstOpen.c
parentf2ea075bfec3d7ed2a75e88eb97d7601030791f5 (diff)
Trivial consequences of the previous list changes:
- audit code for Lst_Datum, it's never applied to an empty pointer, so check can be removed -> turn into a macro, - Lst_First, Lst_Last can become macro as well - specialized version of Lst_Succ (Lst_Adv) to use in loops where it cannot fail, - Lst_Open can no longer fail. Trim down corresponding code. Reviewed millert@, miod@
Diffstat (limited to 'usr.bin/make/lst.lib/lstOpen.c')
-rw-r--r--usr.bin/make/lst.lib/lstOpen.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/make/lst.lib/lstOpen.c b/usr.bin/make/lst.lib/lstOpen.c
index e525358a150..b12d78194c7 100644
--- a/usr.bin/make/lst.lib/lstOpen.c
+++ b/usr.bin/make/lst.lib/lstOpen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstOpen.c,v 1.7 2000/06/17 14:43:40 espie Exp $ */
+/* $OpenBSD: lstOpen.c,v 1.8 2000/06/23 16:15:51 espie Exp $ */
/* $NetBSD: lstOpen.c,v 1.5 1996/11/06 17:59:50 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstOpen.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstOpen.c,v 1.7 2000/06/17 14:43:40 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstOpen.c,v 1.8 2000/06/23 16:15:51 espie Exp $";
#endif
#endif /* not lint */
@@ -69,13 +69,12 @@ static char rcsid[] = "$OpenBSD: lstOpen.c,v 1.7 2000/06/17 14:43:40 espie Exp $
*
*-----------------------------------------------------------------------
*/
-ReturnStatus
+void
Lst_Open(l)
Lst l;
{
l->isOpen = TRUE;
l->atEnd = LstIsEmpty(l) ? Head : Unknown;
l->curPtr = NULL;
- return SUCCESS;
}