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): remove unused code from needshell
details: https://anonhg.NetBSD.org/src/rev/1f21b4aff6a1
branches: trunk
changeset: 941856:1f21b4aff6a1
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Oct 31 18:20:00 2020 +0000
description:
make(1): remove unused code from needshell
Since usr.bin/xinstall no longer uses this code, there is no need to
keep the second parameter.
diffstat:
usr.bin/make/compat.c | 6 +++---
usr.bin/make/metachar.h | 10 +++-------
2 files changed, 6 insertions(+), 10 deletions(-)
diffs (53 lines):
diff -r deb78133a694 -r 1f21b4aff6a1 usr.bin/make/compat.c
--- a/usr.bin/make/compat.c Sat Oct 31 18:17:08 2020 +0000
+++ b/usr.bin/make/compat.c Sat Oct 31 18:20:00 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat.c,v 1.171 2020/10/31 11:54:33 rillig Exp $ */
+/* $NetBSD: compat.c,v 1.172 2020/10/31 18:20:00 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -96,7 +96,7 @@
#include "pathnames.h"
/* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: compat.c,v 1.171 2020/10/31 11:54:33 rillig Exp $");
+MAKE_RCSID("$NetBSD: compat.c,v 1.172 2020/10/31 18:20:00 rillig Exp $");
static GNode *curTarg = NULL;
static pid_t compatChild;
@@ -267,7 +267,7 @@
* meta characters as documented in make(1).
*/
- useShell = needshell(cmd, FALSE);
+ useShell = needshell(cmd);
#endif
/*
diff -r deb78133a694 -r 1f21b4aff6a1 usr.bin/make/metachar.h
--- a/usr.bin/make/metachar.h Sat Oct 31 18:17:08 2020 +0000
+++ b/usr.bin/make/metachar.h Sat Oct 31 18:20:00 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: metachar.h,v 1.10 2020/10/31 18:17:08 rillig Exp $ */
+/* $NetBSD: metachar.h,v 1.11 2020/10/31 18:20:00 rillig Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -38,14 +38,10 @@
#define is_shell_metachar(c) _metachar[(c) & 0x7f]
static inline MAKE_ATTR_UNUSED int
-needshell(const char *cmd, int white)
+needshell(const char *cmd)
{
- while (!is_shell_metachar(*cmd) && *cmd != ':' && *cmd != '=') {
- if (white && ch_isspace(*cmd))
- break;
+ while (!is_shell_metachar(*cmd) && *cmd != ':' && *cmd != '=')
cmd++;
- }
-
return *cmd != '\0';
}
Home |
Main Index |
Thread Index |
Old Index