summaryrefslogtreecommitdiff
path: root/usr.bin/make/arch.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/arch.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/arch.c')
-rw-r--r--usr.bin/make/arch.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c
index dac5f708781..7640bf9e2e9 100644
--- a/usr.bin/make/arch.c
+++ b/usr.bin/make/arch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arch.c,v 1.28 2000/06/17 14:38:13 espie Exp $ */
+/* $OpenBSD: arch.c,v 1.29 2000/06/23 16:15:49 espie Exp $ */
/* $NetBSD: arch.c,v 1.17 1996/11/06 17:58:59 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94";
#else
-static char rcsid[] = "$OpenBSD: arch.c,v 1.28 2000/06/17 14:38:13 espie Exp $";
+static char rcsid[] = "$OpenBSD: arch.c,v 1.29 2000/06/23 16:15:49 espie Exp $";
#endif
#endif /* not lint */
@@ -499,7 +499,7 @@ ArchStatMember (archive, member, hash)
ln = Lst_Find(&archives, ArchFindArchive, archive);
if (ln != NULL) {
- ar = (Arch *) Lst_Datum (ln);
+ ar = (Arch *)Lst_Datum(ln);
he = Hash_FindEntry (&ar->members, member);
@@ -1045,12 +1045,9 @@ Arch_MemMTime (gn)
char *nameStart,
*nameEnd;
- if (Lst_Open(&gn->parents) != SUCCESS) {
- gn->mtime = OUT_OF_DATE;
- return FALSE;
- }
+ Lst_Open(&gn->parents);
while ((ln = Lst_Next(&gn->parents)) != NULL) {
- pgn = (GNode *) Lst_Datum (ln);
+ pgn = (GNode *)Lst_Datum(ln);
if (pgn->type & OP_ARCHV) {
/*