Module Name: src
Committed By: enami
Date: Wed Sep 29 00:44:05 UTC 2010
Modified Files:
src/lib/libc/stdlib: getenv.c
Log Message:
If new length is exactly equals to the current length,
there is nothing to do.
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/lib/libc/stdlib/getenv.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/stdlib/getenv.c
diff -u src/lib/libc/stdlib/getenv.c:1.22 src/lib/libc/stdlib/getenv.c:1.23
--- src/lib/libc/stdlib/getenv.c:1.22 Sat Sep 25 19:31:51 2010
+++ src/lib/libc/stdlib/getenv.c Wed Sep 29 00:44:04 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: getenv.c,v 1.22 2010/09/25 19:31:51 christos Exp $ */
+/* $NetBSD: getenv.c,v 1.23 2010/09/29 00:44:04 enami Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)getenv.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: getenv.c,v 1.22 2010/09/25 19:31:51 christos Exp $");
+__RCSID("$NetBSD: getenv.c,v 1.23 2010/09/29 00:44:04 enami Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -113,7 +113,7 @@
}
nl = offset + 2; /* one for potentially new entry one for NULL */
- if (nl < environ_malloced_len)
+ if (nl <= environ_malloced_len)
return 0;
p = realloc(__environ_malloced, nl * sizeof(*p));