Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make correct case with VAR_KEEP. if clause checked ...
details: https://anonhg.NetBSD.org/src/rev/3f8ee3d5d8d4
branches: trunk
changeset: 506945:3f8ee3d5d8d4
user: itojun <itojun%NetBSD.org@localhost>
date: Fri Mar 09 12:49:05 2001 +0000
description:
correct case with VAR_KEEP. if clause checked VAR_KEEP backwards,
and made str a dangling pointer.
diffstat:
usr.bin/make/var.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r 12b81b29d152 -r 3f8ee3d5d8d4 usr.bin/make/var.c
--- a/usr.bin/make/var.c Fri Mar 09 12:13:15 2001 +0000
+++ b/usr.bin/make/var.c Fri Mar 09 12:49:05 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.56 2000/09/05 21:08:35 christos Exp $ */
+/* $NetBSD: var.c,v 1.57 2001/03/09 12:49:05 itojun Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -39,14 +39,14 @@
*/
#ifdef MAKE_BOOTSTRAP
-static char rcsid[] = "$NetBSD: var.c,v 1.56 2000/09/05 21:08:35 christos Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.57 2001/03/09 12:49:05 itojun Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: var.c,v 1.56 2000/09/05 21:08:35 christos Exp $");
+__RCSID("$NetBSD: var.c,v 1.57 2001/03/09 12:49:05 itojun Exp $");
#endif
#endif /* not lint */
#endif
@@ -2584,7 +2584,7 @@
* doesn't try to free a static pointer.
* If VAR_KEEP is also set then we want to keep str as is.
*/
- if (!(v->flags & VAR_KEEP)) {
+ if ((v->flags & VAR_KEEP) != 0) {
if (*freePtr) {
free(str);
}
Home |
Main Index |
Thread Index |
Old Index