aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/compat.c
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2016-03-11 01:35:39 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2016-03-11 01:35:39 +0000
commitbe19d90b612d233d594d335933c8618e60854713 (patch)
tree1eefb1aee77f4268ae920b1f416feefde0a0000d /contrib/bmake/compat.c
parentc3c6c935fca17c15194dafc56ee3bf4ef9ecd35e (diff)
parentd58aa1959ce6eb99db9e15b1f59db03cfd79069b (diff)
downloadsrc-be19d90b612d233d594d335933c8618e60854713.tar.gz
src-be19d90b612d233d594d335933c8618e60854713.zip
Notes
Diffstat (limited to 'contrib/bmake/compat.c')
-rw-r--r--contrib/bmake/compat.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/contrib/bmake/compat.c b/contrib/bmake/compat.c
index 6cf963ffb2da..475c59d51118 100644
--- a/contrib/bmake/compat.c
+++ b/contrib/bmake/compat.c
@@ -1,4 +1,4 @@
-/* $NetBSD: compat.c,v 1.101 2015/10/11 04:51:24 sjg Exp $ */
+/* $NetBSD: compat.c,v 1.104 2016/02/18 18:29:14 christos Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: compat.c,v 1.101 2015/10/11 04:51:24 sjg Exp $";
+static char rcsid[] = "$NetBSD: compat.c,v 1.104 2016/02/18 18:29:14 christos Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: compat.c,v 1.101 2015/10/11 04:51:24 sjg Exp $");
+__RCSID("$NetBSD: compat.c,v 1.104 2016/02/18 18:29:14 christos Exp $");
#endif
#endif /* not lint */
#endif
@@ -146,8 +146,8 @@ CompatInterrupt(int signo)
if (!noExecute && eunlink(file) != -1) {
Error("*** %s removed", file);
}
- if (p1)
- free(p1);
+
+ free(p1);
/*
* Run .INTERRUPT only if hit with interrupt signal
@@ -213,7 +213,7 @@ CompatRunCommand(void *cmdp, void *gnp)
doIt = FALSE;
cmdNode = Lst_Member(gn->commands, cmd);
- cmdStart = Var_Subst(NULL, cmd, gn, FALSE, TRUE);
+ cmdStart = Var_Subst(NULL, cmd, gn, VARF_WANTRES);
/*
* brk_string will return an argv with a NULL in av[0], thus causing
@@ -374,10 +374,10 @@ again:
execError("exec", av[0]);
_exit(1);
}
- if (mav)
- free(mav);
- if (bp)
- free(bp);
+
+ free(mav);
+ free(bp);
+
Lst_Replace(cmdNode, NULL);
#ifdef USE_META
@@ -516,8 +516,7 @@ Compat_Make(void *gnp, void *pgnp)
if (Lst_Member(gn->iParents, pgn) != NULL) {
char *p1;
Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn, 0);
- if (p1)
- free(p1);
+ free(p1);
}
/*
@@ -620,8 +619,7 @@ Compat_Make(void *gnp, void *pgnp)
if (Lst_Member(gn->iParents, pgn) != NULL) {
char *p1;
Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), pgn, 0);
- if (p1)
- free(p1);
+ free(p1);
}
switch(gn->made) {
case BEINGMADE: