Module Name:    src
Committed By:   rillig
Date:           Sat Oct 24 03:48:09 UTC 2020

Modified Files:
        src/usr.bin/make: arch.c

Log Message:
make(1): make Arch_ParseArchive simpler

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


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/usr.bin/make/arch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/arch.c
diff -u src/usr.bin/make/arch.c:1.141 src/usr.bin/make/arch.c:1.142
--- src/usr.bin/make/arch.c:1.141	Sat Oct 24 03:45:02 2020
+++ src/usr.bin/make/arch.c	Sat Oct 24 03:48:09 2020
@@ -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 @@ Arch_ParseArchive(char **linePtr, GNodeL
 	 */
 	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 == '$') {

Reply via email to