Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make Maybe fix a problem that appeared on loonix.
details: https://anonhg.NetBSD.org/src/rev/2072a3f8c245
branches: trunk
changeset: 760075:2072a3f8c245
user: dholland <dholland%NetBSD.org@localhost>
date: Sat Dec 25 20:46:18 2010 +0000
description:
Maybe fix a problem that appeared on loonix.
diffstat:
usr.bin/make/parse.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (39 lines):
diff -r 45296fcafd33 -r 2072a3f8c245 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Sat Dec 25 20:45:49 2010 +0000
+++ b/usr.bin/make/parse.c Sat Dec 25 20:46:18 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.171 2010/12/25 17:19:04 dholland Exp $ */
+/* $NetBSD: parse.c,v 1.172 2010/12/25 20:46:18 dholland Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: parse.c,v 1.171 2010/12/25 17:19:04 dholland Exp $";
+static char rcsid[] = "$NetBSD: parse.c,v 1.172 2010/12/25 20:46:18 dholland Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: parse.c,v 1.171 2010/12/25 17:19:04 dholland Exp $");
+__RCSID("$NetBSD: parse.c,v 1.172 2010/12/25 20:46:18 dholland Exp $");
#endif
#endif /* not lint */
#endif
@@ -545,8 +545,10 @@
assert(bufpos <= lf->len);
/* truncate malloc region to actual length (maybe not useful) */
- lf->len = bufpos;
- lf->buf = bmake_realloc(lf->buf, lf->len);
+ if (lf->len > 0) {
+ lf->len = bufpos;
+ lf->buf = bmake_realloc(lf->buf, lf->len);
+ }
done:
if (path != NULL) {
Home |
Main Index |
Thread Index |
Old Index