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): make Arch_ParseArchive simpler



details:   https://anonhg.NetBSD.org/src/rev/a7f43032a0ab
branches:  trunk
changeset: 945209:a7f43032a0ab
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 24 03:48:09 2020 +0000

description:
make(1): make Arch_ParseArchive simpler

Neither '\0' nor ')' have ever been space characters.

diffstat:

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

diffs (30 lines):

diff -r 8b854e7bb746 -r a7f43032a0ab usr.bin/make/arch.c
--- a/usr.bin/make/arch.c       Sat Oct 24 03:45:02 2020 +0000
+++ b/usr.bin/make/arch.c       Sat Oct 24 03:48:09 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arch.c,v 1.141 2020/10/24 03:45:02 rillig Exp $        */
+/*     $NetBSD: arch.c,v 1.142 2020/10/24 03:48:09 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -130,7 +130,7 @@
 #include    "config.h"
 
 /*     "@(#)arch.c     8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: arch.c,v 1.141 2020/10/24 03:45:02 rillig Exp $");
+MAKE_RCSID("$NetBSD: arch.c,v 1.142 2020/10/24 03:48:09 rillig Exp $");
 
 #ifdef TARGET_MACHINE
 #undef MAKE_MACHINE
@@ -255,9 +255,8 @@
         */
        Boolean doSubst = FALSE; /* TRUE if need to substitute in memName */
 
-       while (*cp != '\0' && *cp != ')' && ch_isspace(*cp)) {
-           cp++;
-       }
+       pp_skip_whitespace(&cp);
+
        memName = cp;
        while (*cp != '\0' && *cp != ')' && !ch_isspace(*cp)) {
            if (*cp == '$') {



Home | Main Index | Thread Index | Old Index