(__add_to_environ): Initialize ep after we have the lock.

Avoid warning about uninitialized variable.
This commit is contained in:
Ulrich Drepper 1999-08-19 20:11:33 +00:00
parent 336c2454d6
commit 9c4140bada

View File

@ -120,17 +120,21 @@ __add_to_environ (name, value, combined, replace)
LOCK;
/* We have to get the pointer now that we have the lock and not earlier
since another thread might have created a new environment. */
ep = __environ;
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