summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-05-10 12:02:15 +0000
committerharti <harti@FreeBSD.org>2005-05-10 12:02:15 +0000
commite571f8f77c821803b7c8084feb8283f6dd32db1e (patch)
tree3aafffb2115065394ec59393e49db455b31b65ea
parentaac19b11ef29f0b93bf97f28d1096f4f86dcb44e (diff)
downloadFreeBSD-src-e571f8f77c821803b7c8084feb8283f6dd32db1e.zip
FreeBSD-src-e571f8f77c821803b7c8084feb8283f6dd32db1e.tar.gz
Var_SubstOnly() is only used to subsitute a variable from the global
context (and only in one place to substitute the .for variable). Therefor there is no need to pass the context as a parameter. Patch: 7.197 Submitted by: Max Okumoto <okumoto@ucsd.edu>
-rw-r--r--usr.bin/make/for.c3
-rw-r--r--usr.bin/make/var.c3
-rw-r--r--usr.bin/make/var.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/make/for.c b/usr.bin/make/for.c
index f0e0b4e..15372b6 100644
--- a/usr.bin/make/for.c
+++ b/usr.bin/make/for.c
@@ -271,8 +271,7 @@ For_Run(int lineno)
Var_Set(var, val, VAR_GLOBAL);
DEBUGF(FOR, ("--- %s = %s\n", var, val));
- str = Buf_Peel(Var_SubstOnly(var, Buf_Data(buf),
- VAR_GLOBAL, FALSE));
+ str = Buf_Peel(Var_SubstOnly(var, Buf_Data(buf), FALSE));
Parse_FromString(str, lineno);
Var_Delete(var, VAR_GLOBAL);
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c
index a23069d..4873af2 100644
--- a/usr.bin/make/var.c
+++ b/usr.bin/make/var.c
@@ -2380,8 +2380,9 @@ Var_Subst(const char *str, GNode *ctxt, Boolean err)
* None. The old string must be freed by the caller
*/
Buffer *
-Var_SubstOnly(const char *var, const char *str, GNode *ctxt, Boolean err)
+Var_SubstOnly(const char *var, const char *str, Boolean err)
{
+ GNode *ctxt = VAR_GLOBAL;
Boolean errorReported;
Buffer *buf; /* Buffer for forming things */
diff --git a/usr.bin/make/var.h b/usr.bin/make/var.h
index 5f1948d..2294b95 100644
--- a/usr.bin/make/var.h
+++ b/usr.bin/make/var.h
@@ -61,7 +61,7 @@ char *Var_Parse(const char *, struct GNode *, Boolean, size_t *, Boolean *);
void Var_Set(const char *, const char *, struct GNode *);
void Var_SetEnv(const char *, struct GNode *);
struct Buffer *Var_Subst(const char *, struct GNode *, Boolean);
-struct Buffer *Var_SubstOnly(const char *, const char *, struct GNode *, Boolean);
+struct Buffer *Var_SubstOnly(const char *, const char *, Boolean);
char *Var_Value(const char *, struct GNode *, char **);
#endif /* var_h_9cccafce */
OpenPOWER on IntegriCloud