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: remove redundant parameter from ParseDepe...



details:   https://anonhg.NetBSD.org/src/rev/e48aaeab6712
branches:  trunk
changeset: 1029258:e48aaeab6712
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Dec 28 17:45:56 2021 +0000

description:
make: remove redundant parameter from ParseDependencyTargets

No functional change.

diffstat:

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

diffs (61 lines):

diff -r af31320309c5 -r e48aaeab6712 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Tue Dec 28 17:39:04 2021 +0000
+++ b/usr.bin/make/parse.c      Tue Dec 28 17:45:56 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.597 2021/12/28 17:39:04 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.598 2021/12/28 17:45:56 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.597 2021/12/28 17:39:04 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.598 2021/12/28 17:45:56 rillig Exp $");
 
 /* types and constants */
 
@@ -1378,14 +1378,13 @@
 
 static bool
 ParseDependencyTargets(char **inout_cp,
-                      char **inout_line,
                       const char *lstart,
                       ParseSpecial *inout_special,
                       GNodeType *inout_targetAttr,
                       SearchPathList **inout_paths)
 {
        char *cp;
-       char *tgt = *inout_line;
+       char *tgt = *inout_cp;
        char savec;
        const char *p;
 
@@ -1457,7 +1456,6 @@
        }
 
        *inout_cp = cp;
-       *inout_line = tgt;
        return true;
 }
 
@@ -1618,7 +1616,6 @@
        SearchPathList *paths;  /* search paths to alter when parsing a list
                                 * of .PATH targets */
        GNodeType targetAttr;   /* from special sources */
-       const char *lstart = line;
 
        /*
         * In special targets, the children are linked as children of the
@@ -1631,8 +1628,8 @@
 
        paths = NULL;
 
-       /* XXX: don't use 'line' as an iterator variable */
-       if (!ParseDependencyTargets(&cp, &line, lstart, &special,
+       cp = line;
+       if (!ParseDependencyTargets(&cp, line, &special,
            &targetAttr, &paths))
                goto out;
 



Home | Main Index | Thread Index | Old Index