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): split complicated condition in ParseDo...



details:   https://anonhg.NetBSD.org/src/rev/6ae0e88958ab
branches:  trunk
changeset: 954982:6ae0e88958ab
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Sep 14 16:05:09 2020 +0000

description:
make(1): split complicated condition in ParseDoDependency

diffstat:

 usr.bin/make/parse.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (33 lines):

diff -r 1fe1334d7c54 -r 6ae0e88958ab usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Mon Sep 14 15:17:53 2020 +0000
+++ b/usr.bin/make/parse.c      Mon Sep 14 16:05:09 2020 +0000
@@ -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 @@
         */
 
        /* 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



Home | Main Index | Thread Index | Old Index