Subject: CVS commit: src/lib/libc/stdlib
To: None <source-changes@NetBSD.org>
From: Christos Zoulas <christos@netbsd.org>
List: source-changes
Date: 02/17/2005 02:17:43
Module Name:	src
Committed By:	christos
Date:		Thu Feb 17 02:17:43 UTC 2005

Modified Files:
	src/lib/libc/stdlib: setenv.c

Log Message:
Simplify and KNF. Instead of keeping track if the pointer was allocated,
keep a copy of the pointer itself and only re-use it if the current
environment is equal to the saved pointer. Idea from OpenBSD. Avoids
problem of re-allocing a non-allocated pointer if a program resets the
environment after it has been grown.


To generate a diff of this commit:
cvs rdiff -r1.23 -r1.24 src/lib/libc/stdlib/setenv.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.