diff --git a/usr.bin/make/for.c b/usr.bin/make/for.c index f0e0b4eecee3..15372b648e95 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 a23069dc56b2..4873af241d14 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 5f1948db9d7e..2294b95866f7 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 */