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,24 +709,16 @@ stats_print_atexit(void)
*/ */
#ifndef JEMALLOC_HAVE_SECURE_GETENV #ifndef JEMALLOC_HAVE_SECURE_GETENV
static char *
secure_getenv(const char *name)
{
# ifdef JEMALLOC_HAVE_ISSETUGID # ifdef JEMALLOC_HAVE_ISSETUGID
static char * if (issetugid() != 0)
secure_getenv(const char *name)
{
if (issetugid() == 0)
return (getenv(name));
else
return (NULL); return (NULL);
} # endif
# else
static char *
secure_getenv(const char *name)
{
return (getenv(name)); return (getenv(name));
} }
# endif
#endif #endif
static unsigned static unsigned