diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-08-18 23:21:04 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-08-18 23:21:04 +0000 |
commit | 96ff49374e18f70784697f776160088474780c61 (patch) | |
tree | 982406a3fcb2cb72d61d8eb6c3396cd7d4f293df /sysdeps/generic | |
parent | 310f95183a026af2d7854f830b185116aa770852 (diff) | |
download | glibc-96ff49374e18f70784697f776160088474780c61.tar.gz glibc-96ff49374e18f70784697f776160088474780c61.tar.xz glibc-96ff49374e18f70784697f776160088474780c61.zip |
Update.
* sysdeps/generic/setenv.c: Avoid warning about uninitialized variable.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/setenv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/generic/setenv.c b/sysdeps/generic/setenv.c index fc58e9b346..387152dcad 100644 --- a/sysdeps/generic/setenv.c +++ b/sysdeps/generic/setenv.c @@ -113,7 +113,7 @@ __add_to_environ (name, value, combined, replace) const char *combined; int replace; { - register char **ep; + register char **ep = __environ; register size_t size; const size_t namelen = strlen (name); const size_t vallen = value != NULL ? strlen (value) + 1 : 0; @@ -121,16 +121,16 @@ __add_to_environ (name, value, combined, replace) LOCK; size = 0; - if (__environ != NULL) + if (ep != NULL) { - for (ep = __environ; *ep != NULL; ++ep) + for (; *ep != NULL; ++ep) if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=') break; else ++size; } - if (__environ == NULL || *ep == NULL) + if (ep == NULL || *ep == NULL) { char **new_environ; #ifdef USE_TSEARCH |