mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-18 14:40:06 +00:00
malloc: remove redundant getenv call
* malloc/memusage.c (me): Remove redundant getenv call.
This commit is contained in:
parent
2359035ac5
commit
87d0eecece
@ -1,3 +1,7 @@
|
|||||||
|
2015-11-24 Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
|
||||||
|
|
||||||
|
* malloc/memusage.c (me): Remove redundant getenv call.
|
||||||
|
|
||||||
2015-10-24 Florian Weimer <fweimer@redhat.com>
|
2015-10-24 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
[BZ #19143]
|
[BZ #19143]
|
||||||
|
@ -276,9 +276,10 @@ me (void)
|
|||||||
/* Determine the buffer size. We use the default if the
|
/* Determine the buffer size. We use the default if the
|
||||||
environment variable is not present. */
|
environment variable is not present. */
|
||||||
buffer_size = DEFAULT_BUFFER_SIZE;
|
buffer_size = DEFAULT_BUFFER_SIZE;
|
||||||
if (getenv ("MEMUSAGE_BUFFER_SIZE") != NULL)
|
const char *str_buffer_size = getenv ("MEMUSAGE_BUFFER_SIZE");
|
||||||
|
if (str_buffer_size != NULL)
|
||||||
{
|
{
|
||||||
buffer_size = atoi (getenv ("MEMUSAGE_BUFFER_SIZE"));
|
buffer_size = atoi (str_buffer_size);
|
||||||
if (buffer_size == 0 || buffer_size > DEFAULT_BUFFER_SIZE)
|
if (buffer_size == 0 || buffer_size > DEFAULT_BUFFER_SIZE)
|
||||||
buffer_size = DEFAULT_BUFFER_SIZE;
|
buffer_size = DEFAULT_BUFFER_SIZE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user