summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>1999-09-28 21:57:04 +0000
committerespie <espie@openbsd.org>1999-09-28 21:57:04 +0000
commit71c0d4520cda44ff4d6da3b6425fc65da1303be9 (patch)
treebca6bd5b19d201bb73046709de8188a4e9c114b9
parentDebug code is one thing, commenting out pclose is another... (diff)
downloadwireguard-openbsd-71c0d4520cda44ff4d6da3b6425fc65da1303be9.tar.xz
wireguard-openbsd-71c0d4520cda44ff4d6da3b6425fc65da1303be9.zip
Fix
.if defined(VAR) && ${VAR:m} cond.c has special code (set err to 0) to tell VarParse it shouldn't care if the variable is not defined. But this was not completely added, namely the path that deals with modifiers was blissfully unaware of that.
-rw-r--r--usr.bin/make/var.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c
index 442e14643e5..472df73451f 100644
--- a/usr.bin/make/var.c
+++ b/usr.bin/make/var.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: var.c,v 1.11 1999/09/25 14:44:00 espie Exp $ */
+/* $OpenBSD: var.c,v 1.12 1999/09/28 21:57:04 espie Exp $ */
/* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-static char rcsid[] = "$OpenBSD: var.c,v 1.11 1999/09/25 14:44:00 espie Exp $";
+static char rcsid[] = "$OpenBSD: var.c,v 1.12 1999/09/28 21:57:04 espie Exp $";
#endif
#endif /* not lint */
@@ -2136,7 +2136,7 @@ Var_Parse (str, ctxt, err, lengthPtr, freePtr)
str[*lengthPtr] = '\0';
*freePtr = TRUE;
} else {
- str = var_Error;
+ str = err ? var_Error : varNoError;
}
}
return (str);