Module Name: src Committed By: rillig Date: Fri Nov 20 00:24:57 UTC 2020
Modified Files: src/usr.bin/make: parse.c Log Message: make(1): fix local variable name in ParseDoDependencyTargets To generate a diff of this commit: cvs rdiff -u -r1.443 -r1.444 src/usr.bin/make/parse.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/parse.c diff -u src/usr.bin/make/parse.c:1.443 src/usr.bin/make/parse.c:1.444 --- src/usr.bin/make/parse.c:1.443 Mon Nov 16 21:39:22 2020 +++ src/usr.bin/make/parse.c Fri Nov 20 00:24:56 2020 @@ -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 @@ ParseDoDependencyTargets(char **inout_cp StringList *curTargs) { char *cp = *inout_cp; - char *line = *inout_line; + char *tgt = *inout_line; char savec; for (;;) { @@ -1430,7 +1430,7 @@ ParseDoDependencyTargets(char **inout_cp */ /* Find the end of the next word. */ - cp = line; + cp = tgt; ParseDependencyTargetWord(&cp, lstart); /* @@ -1448,15 +1448,15 @@ ParseDoDependencyTargets(char **inout_cp * 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 @@ ParseDoDependencyTargets(char **inout_cp 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 @@ ParseDoDependencyTargets(char **inout_cp * 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 @@ ParseDoDependencyTargets(char **inout_cp 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; }