Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 95e88de

Browse files
poigejasone
authored andcommitted
Concise JEMALLOC_HAVE_ISSETUGID case in secure_getenv().
1 parent 8975035 commit 95e88de

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/jemalloc.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -709,24 +709,16 @@ stats_print_atexit(void)
709709
*/
710710

711711
#ifndef JEMALLOC_HAVE_SECURE_GETENV
712-
# ifdef JEMALLOC_HAVE_ISSETUGID
713712
static char *
714713
secure_getenv(const char *name)
715714
{
716715

717-
if (issetugid() == 0)
718-
return (getenv(name));
719-
else
716+
# ifdef JEMALLOC_HAVE_ISSETUGID
717+
if (issetugid() != 0)
720718
return (NULL);
721-
}
722-
# else
723-
static char *
724-
secure_getenv(const char *name)
725-
{
726-
719+
# endif
727720
return (getenv(name));
728721
}
729-
# endif
730722
#endif
731723

732724
static unsigned

0 commit comments

Comments
 (0)