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): clean up another local variable in Par...



details:   https://anonhg.NetBSD.org/src/rev/21b679eb5892
branches:  trunk
changeset: 947585:21b679eb5892
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Dec 19 00:02:34 2020 +0000

description:
make(1): clean up another local variable in ParseGetLine

diffstat:

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

diffs (53 lines):

diff -r 5f1175d45665 -r 21b679eb5892 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Fri Dec 18 23:18:08 2020 +0000
+++ b/usr.bin/make/parse.c      Sat Dec 19 00:02:34 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.487 2020/12/18 23:18:08 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.488 2020/12/19 00:02:34 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.487 2020/12/18 23:18:08 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.488 2020/12/19 00:02:34 rillig Exp $");
 
 /* types and constants */
 
@@ -2657,7 +2657,7 @@
 }
 
 static void
-UnescapeBackslash(char **out_tp, char *escaped, char *const line)
+UnescapeBackslash(char *escaped, char *const line)
 {
        char *tp, *ptr;
 
@@ -2710,8 +2710,6 @@
        while (tp > escaped && ch_isspace(tp[-1]))
                tp--;
        *tp = '\0';
-
-       *out_tp = tp;
 }
 
 typedef enum GetLineMode {
@@ -2730,7 +2728,6 @@
        char *line_end;
        char *escaped;
        char *comment;
-       char *tp;
 
        /* Loop through blank lines and comment lines */
        for (;;) {
@@ -2831,7 +2828,7 @@
                return line;
 
        /* Remove escapes from '\n' and '#' */
-       UnescapeBackslash(&tp, escaped, line);
+       UnescapeBackslash(escaped, line);
 
        return line;
 }



Home | Main Index | Thread Index | Old Index