1998-05-15  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/generic/setenv.c (setenv): Remove optimization for
	overwriting existing values if it fits.
This commit is contained in:
Ulrich Drepper 1998-05-15 15:28:15 +00:00
parent b17277cfa2
commit cb37d8429a
2 changed files with 32 additions and 33 deletions

View File

@ -1,3 +1,8 @@
1998-05-15 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/setenv.c (setenv): Remove optimization for
overwriting existing values if it fits.
1998-05-15 14:36 Ulrich Drepper <drepper@cygnus.com>
* posix/wordexp-test.c: Avoid duplicate messages.

View File

@ -187,8 +187,6 @@ setenv (name, value, replace)
else if (replace)
{
size_t len = strlen (*ep);
if (len + 1 < namelen + 1 + vallen)
{
char *new_value;
char *np;
@ -228,10 +226,6 @@ setenv (name, value, replace)
STORE_VALUE (*ep);
*ep = np;
}
else
/* Overwrite the value part of the old value. */
memcpy (&(*ep)[namelen + 1], value, vallen);
}
UNLOCK;