mirror of git://sourceware.org/git/glibc.git
Update.
* sysdeps/generic/setenv.c: Avoid warning about uninitialized variable.
This commit is contained in:
parent
310f95183a
commit
96ff49374e
|
|
@ -1,5 +1,7 @@
|
||||||
1999-08-18 Ulrich Drepper <drepper@cygnus.com>
|
1999-08-18 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
|
* sysdeps/generic/setenv.c: Avoid warning about uninitialized variable.
|
||||||
|
|
||||||
* libio/fileops.c (_IO_file_xsgetn): Allocate buffer if none is
|
* libio/fileops.c (_IO_file_xsgetn): Allocate buffer if none is
|
||||||
allocated so far. [PR libc/1261].
|
allocated so far. [PR libc/1261].
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ __add_to_environ (name, value, combined, replace)
|
||||||
const char *combined;
|
const char *combined;
|
||||||
int replace;
|
int replace;
|
||||||
{
|
{
|
||||||
register char **ep;
|
register char **ep = __environ;
|
||||||
register size_t size;
|
register size_t size;
|
||||||
const size_t namelen = strlen (name);
|
const size_t namelen = strlen (name);
|
||||||
const size_t vallen = value != NULL ? strlen (value) + 1 : 0;
|
const size_t vallen = value != NULL ? strlen (value) + 1 : 0;
|
||||||
|
|
@ -121,16 +121,16 @@ __add_to_environ (name, value, combined, replace)
|
||||||
LOCK;
|
LOCK;
|
||||||
|
|
||||||
size = 0;
|
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] == '=')
|
if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=')
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
++size;
|
++size;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__environ == NULL || *ep == NULL)
|
if (ep == NULL || *ep == NULL)
|
||||||
{
|
{
|
||||||
char **new_environ;
|
char **new_environ;
|
||||||
#ifdef USE_TSEARCH
|
#ifdef USE_TSEARCH
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue