Concise JEMALLOC_HAVE_ISSETUGID case in secure_getenv().
This commit is contained in:
parent
897503521d
commit
95e88de0aa
@ -709,24 +709,16 @@ 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
|
||||
|
Loading…
Reference in New Issue
Block a user