summaryrefslogtreecommitdiff
path: root/usr.bin/make/parse.c
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2020-11-29 01:40:26 +0000
committerrillig <rillig@NetBSD.org>2020-11-29 01:40:26 +0000
commit2e6a660d279fb735a80bce07ca3f6138acee8ceb (patch)
treea42970ffb7e88863be10da750050abd6dfc7cd48 /usr.bin/make/parse.c
parent0a93711a0d4ccf6cf45732e3a8e00ba947c5204e (diff)
make(1): reduce memory allocation for dirSearchPath
Diffstat (limited to 'usr.bin/make/parse.c')
-rw-r--r--usr.bin/make/parse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index cac3f18865f..39afffde0c3 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.462 2020/11/29 01:35:33 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.463 2020/11/29 01:40:26 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.462 2020/11/29 01:35:33 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.463 2020/11/29 01:40:26 rillig Exp $");
/* types and constants */
@@ -1087,7 +1087,7 @@ ParseDoDependencyTargetSpecial(ParseSpecial *inout_specType,
case SP_PATH:
if (*inout_paths == NULL)
*inout_paths = Lst_New();
- Lst_Append(*inout_paths, dirSearchPath);
+ Lst_Append(*inout_paths, &dirSearchPath);
break;
case SP_MAIN:
/* Allow targets from the command line to override the .MAIN node. */
@@ -2132,7 +2132,7 @@ Parse_include_file(char *file, Boolean isSystem, Boolean depinc, Boolean silent)
newName = str_concat3(incdir, "/", file + i);
fullname = Dir_FindFile(newName, parseIncPath);
if (fullname == NULL)
- fullname = Dir_FindFile(newName, dirSearchPath);
+ fullname = Dir_FindFile(newName, &dirSearchPath);
free(newName);
}
free(incdir);
@@ -2155,7 +2155,7 @@ Parse_include_file(char *file, Boolean isSystem, Boolean depinc, Boolean silent)
if (fullname == NULL) {
fullname = Dir_FindFile(file, parseIncPath);
if (fullname == NULL)
- fullname = Dir_FindFile(file, dirSearchPath);
+ fullname = Dir_FindFile(file, &dirSearchPath);
}
}
}