summaryrefslogtreecommitdiff
path: root/usr.bin/make/var.c
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2003-10-07 18:33:09 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2003-10-07 18:33:09 +0000
commit29abf1981089118cea78a23844ba31e692f331d6 (patch)
tree2e59a01484deff4637c9cc274ed15646d7850f36 /usr.bin/make/var.c
parentefa5db6a09beb98d6ce40775b2717cc31abae3be (diff)
- check if result is valid before using it.
- correctly set *freePtr, not freePtr. input and ok espie@.
Diffstat (limited to 'usr.bin/make/var.c')
-rw-r--r--usr.bin/make/var.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c
index a930a965225..e2dbb058871 100644
--- a/usr.bin/make/var.c
+++ b/usr.bin/make/var.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: var.c,v 1.57 2003/06/03 02:56:12 millert Exp $ */
+/* $OpenBSD: var.c,v 1.58 2003/10/07 18:33:08 fgsch Exp $ */
/* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */
/*
@@ -841,7 +841,8 @@ Var_ParseSkip(str, ctxt, result)
if (*tstr == ':' && endc != '\0')
if (VarModifiers_Apply(NULL, NULL, ctxt, true, NULL, tstr, endc,
&length) == var_Error)
- *result = false;
+ if (result != NULL)
+ *result = false;
return length;
}