summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2020-09-14 16:05:09 +0000
committerrillig <rillig@NetBSD.org>2020-09-14 16:05:09 +0000
commitf42e2f9addb59aae1df82e1d1facb36eaaf06aa2 (patch)
tree50ba2be1c976344dee88be64e397fc580f931223
parent64f061187836f85a6a6cfc7d63d074ce6e6e747e (diff)
make(1): split complicated condition in ParseDoDependency
-rw-r--r--usr.bin/make/parse.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 7139532d3a4..e9f61668bd7 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.307 2020/09/14 15:11:13 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.308 2020/09/14 16:05:09 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -131,7 +131,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.307 2020/09/14 15:11:13 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.308 2020/09/14 16:05:09 rillig Exp $");
/* types and constants */
@@ -1140,9 +1140,11 @@ ParseDoDependency(char *line)
*/
/* Find the end of the next word. */
- for (cp = line; *cp && (ParseIsEscaped(lstart, cp) ||
- !(ch_isspace(*cp) ||
- *cp == '!' || *cp == ':' || *cp == LPAREN));) {
+ for (cp = line; *cp != '\0';) {
+ if (!ParseIsEscaped(lstart, cp) &&
+ (ch_isspace(*cp) || *cp == '!' || *cp == ':' || *cp == LPAREN))
+ break;
+
if (*cp == '$') {
/*
* Must be a dynamic source (would have been expanded