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 dead code for filename expansio...



details:   https://anonhg.NetBSD.org/src/rev/105c3fff7c07
branches:  trunk
changeset: 945514:105c3fff7c07
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 31 17:39:20 2020 +0000

description:
make(1): remove dead code for filename expansion using curly braces

Any string containing curly braces is already handled in the very first
if statement.

diffstat:

 usr.bin/make/dir.c |  15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diffs (39 lines):

diff -r 3a1c41b0e841 -r 105c3fff7c07 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c        Sat Oct 31 16:13:00 2020 +0000
+++ b/usr.bin/make/dir.c        Sat Oct 31 17:39:20 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dir.c,v 1.192 2020/10/30 15:39:17 rillig Exp $ */
+/*     $NetBSD: dir.c,v 1.193 2020/10/31 17:39:20 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -134,7 +134,7 @@
 #include "job.h"
 
 /*     "@(#)dir.c      8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: dir.c,v 1.192 2020/10/30 15:39:17 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.193 2020/10/31 17:39:20 rillig Exp $");
 
 #define DIR_DEBUG0(text) DEBUG0(DIR, text)
 #define DIR_DEBUG1(fmt, arg1) DEBUG1(DIR, fmt, arg1)
@@ -790,17 +790,12 @@
             * in the string.
             */
            for (cp = word; *cp; cp++) {
-               if (*cp == '?' || *cp == '[' || *cp == '*' || *cp == '{') {
+               if (*cp == '?' || *cp == '[' || *cp == '*') {
                    break;
                }
            }
-           if (*cp == '{') {
-               /*
-                * This one will be fun.
-                */
-               DirExpandCurly(word, cp, path, expansions);
-               return;
-           } else if (*cp != '\0') {
+
+           if (*cp != '\0') {
                /*
                 * Back up to the start of the component
                 */



Home | Main Index | Thread Index | Old Index