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): fix local variable name in ParseDoDepe...



details:   https://anonhg.NetBSD.org/src/rev/f67986256a2c
branches:  trunk
changeset: 957145:f67986256a2c
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Nov 20 00:24:56 2020 +0000

description:
make(1): fix local variable name in ParseDoDependencyTargets

diffstat:

 usr.bin/make/parse.c |  38 +++++++++++++++++++-------------------
 1 files changed, 19 insertions(+), 19 deletions(-)

diffs (102 lines):

diff -r cd08e037d2f0 -r f67986256a2c usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Fri Nov 20 00:24:21 2020 +0000
+++ b/usr.bin/make/parse.c      Fri Nov 20 00:24:56 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.443 2020/11/16 21:39:22 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.444 2020/11/20 00:24:56 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -117,7 +117,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.443 2020/11/16 21:39:22 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.444 2020/11/20 00:24:56 rillig Exp $");
 
 /* types and constants */
 
@@ -1420,7 +1420,7 @@
                         StringList *curTargs)
 {
     char *cp = *inout_cp;
-    char *line = *inout_line;
+    char *tgt = *inout_line;
     char savec;
 
     for (;;) {
@@ -1430,7 +1430,7 @@
         */
 
        /* Find the end of the next word. */
-       cp = line;
+       cp = tgt;
        ParseDependencyTargetWord(&cp, lstart);
 
        /*
@@ -1448,15 +1448,15 @@
             * went well and FALSE if there was an error in the
             * specification. On error, line should remain untouched.
             */
-           if (!Arch_ParseArchive(&line, targets, VAR_CMDLINE)) {
+           if (!Arch_ParseArchive(&tgt, targets, VAR_CMDLINE)) {
                Parse_Error(PARSE_FATAL,
-                           "Error in archive specification: \"%s\"", line);
+                           "Error in archive specification: \"%s\"",
+                           tgt);
                return FALSE;
-           } else {
-               /* Done with this word; on to the next. */
-               cp = line;
-               continue;
            }
+
+           cp = tgt;
+           continue;
        }
 
        if (!*cp) {
@@ -1468,7 +1468,7 @@
        savec = *cp;
        *cp = '\0';
 
-       if (!ParseDoDependencyTarget(line, inout_specType, inout_tOp,
+       if (!ParseDoDependencyTarget(tgt, inout_specType, inout_tOp,
                                     inout_paths))
            return FALSE;
 
@@ -1476,10 +1476,10 @@
         * Have word in line. Get or create its node and stick it at
         * the end of the targets list
         */
-       if (*inout_specType == SP_NOT && *line != '\0')
-           ParseDoDependencyTargetMundane(line, curTargs);
-       else if (*inout_specType == SP_PATH && *line != '.' && *line != '\0')
-           Parse_Error(PARSE_WARNING, "Extra target (%s) ignored", line);
+       if (*inout_specType == SP_NOT && *tgt != '\0')
+           ParseDoDependencyTargetMundane(tgt, curTargs);
+       else if (*inout_specType == SP_PATH && *tgt != '.' && *tgt != '\0')
+           Parse_Error(PARSE_WARNING, "Extra target (%s) ignored", tgt);
 
        /* Don't need the inserted null terminator any more. */
        *cp = savec;
@@ -1493,15 +1493,15 @@
        else
            pp_skip_whitespace(&cp);
 
-       line = cp;
-       if (*line == '\0')
+       tgt = cp;
+       if (*tgt == '\0')
            break;
-       if ((*line == '!' || *line == ':') && !ParseIsEscaped(lstart, line))
+       if ((*tgt == '!' || *tgt == ':') && !ParseIsEscaped(lstart, tgt))
            break;
     }
 
     *inout_cp = cp;
-    *inout_line = line;
+    *inout_line = tgt;
     return TRUE;
 }
 



Home | Main Index | Thread Index | Old Index