Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): use Lst_OpenS in Arch_MemMTime



details:   https://anonhg.NetBSD.org/src/rev/d9fcb5c80f13
branches:  trunk
changeset: 942966:d9fcb5c80f13
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Aug 22 21:58:27 2020 +0000

description:
make(1): use Lst_OpenS in Arch_MemMTime

The field GNode.parents is guaranteed to be a valid list.

diffstat:

 usr.bin/make/arch.c |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (38 lines):

diff -r 512f1f2e04dc -r d9fcb5c80f13 usr.bin/make/arch.c
--- a/usr.bin/make/arch.c       Sat Aug 22 21:55:54 2020 +0000
+++ b/usr.bin/make/arch.c       Sat Aug 22 21:58:27 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arch.c,v 1.90 2020/08/22 15:46:28 rillig Exp $ */
+/*     $NetBSD: arch.c,v 1.91 2020/08/22 21:58:27 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: arch.c,v 1.90 2020/08/22 15:46:28 rillig Exp $";
+static char rcsid[] = "$NetBSD: arch.c,v 1.91 2020/08/22 21:58:27 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)arch.c     8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: arch.c,v 1.90 2020/08/22 15:46:28 rillig Exp $");
+__RCSID("$NetBSD: arch.c,v 1.91 2020/08/22 21:58:27 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -1123,10 +1123,7 @@
     char         *nameStart,
                  *nameEnd;
 
-    if (Lst_Open(gn->parents) != SUCCESS) {
-       gn->mtime = 0;
-       return 0;
-    }
+    Lst_OpenS(gn->parents);
     while ((ln = Lst_NextS(gn->parents)) != NULL) {
        pgn = Lst_DatumS(ln);
 



Home | Main Index | Thread Index | Old Index