Concise JEMALLOC_HAVE_ISSETUGID case in secure_getenv().

This commit is contained in:
Igor Podlesny 2015-03-24 12:49:26 +07:00 committed by Jason Evans
parent 897503521d
commit 95e88de0aa

View File

@ -709,25 +709,17 @@ stats_print_atexit(void)
*/
#ifndef JEMALLOC_HAVE_SECURE_GETENV
static char *
secure_getenv(const char *name)
{
# ifdef JEMALLOC_HAVE_ISSETUGID
static char *
secure_getenv(const char *name)
{
if (issetugid() == 0)
return (getenv(name));
else
if (issetugid() != 0)
return (NULL);
}
# else
static char *
secure_getenv(const char *name)
{
# endif
return (getenv(name));
}
#endif
#endif
static unsigned
malloc_ncpus(void)