* environ.cc (setenv): Use __cygwin_environ instead of

environ after reallocating environment space.
This commit is contained in:
Corinna Vinschen
2000-07-17 15:59:27 +00:00
parent c609f9dcec
commit b0d5cd02dc
2 changed files with 7 additions and 2 deletions

View File

@@ -228,9 +228,9 @@ setenv (const char *name, const char *value, int rewrite)
;
__cygwin_environ = (char **) realloc ((char *) environ,
(size_t) (sizeof (char *) * (cnt + 2)));
if (!environ)
if (!__cygwin_environ)
return -1;
environ[cnt + 1] = NULL;
__cygwin_environ[cnt + 1] = NULL;
update_envptrs ();
offset = cnt;
}