Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make Clarify that assignment is for effect, not trut...



details:   https://anonhg.NetBSD.org/src/rev/af007489a22d
branches:  trunk
changeset: 823237:af007489a22d
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Apr 16 21:04:44 2017 +0000

description:
Clarify that assignment is for effect, not truth of value.

CID 977502

diffstat:

 usr.bin/make/for.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 03f5aa9087cd -r af007489a22d usr.bin/make/for.c
--- a/usr.bin/make/for.c        Sun Apr 16 21:03:13 2017 +0000
+++ b/usr.bin/make/for.c        Sun Apr 16 21:04:44 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: for.c,v 1.52 2016/02/18 18:29:14 christos Exp $        */
+/*     $NetBSD: for.c,v 1.53 2017/04/16 21:04:44 riastradh Exp $       */
 
 /*
  * Copyright (c) 1992, The Regents of the University of California.
@@ -30,14 +30,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: for.c,v 1.52 2016/02/18 18:29:14 christos Exp $";
+static char rcsid[] = "$NetBSD: for.c,v 1.53 2017/04/16 21:04:44 riastradh Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)for.c      8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: for.c,v 1.52 2016/02/18 18:29:14 christos Exp $");
+__RCSID("$NetBSD: for.c,v 1.53 2017/04/16 21:04:44 riastradh Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -427,7 +427,7 @@
     for (cp = cmd_cp; (cp = strchr(cp, '$')) != NULL;) {
        char ech;
        ch = *++cp;
-       if ((ch == '(' && (ech = ')')) || (ch == '{' && (ech = '}'))) {
+       if ((ch == '(' && (ech = ')', 1)) || (ch == '{' && (ech = '}', 1))) {
            cp++;
            /* Check variable name against the .for loop variables */
            STRLIST_FOREACH(var, &arg->vars, i) {



Home | Main Index | Thread Index | Old Index