summaryrefslogtreecommitdiff
path: root/elf/dl-support.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-support.c')
-rw-r--r--elf/dl-support.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/elf/dl-support.c b/elf/dl-support.c
index e3df749ae5..8bf6814de2 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -257,22 +257,22 @@ _dl_non_dynamic_init (void)
if (__libc_enable_secure)
{
- static const char *unsecure_envvars[] =
- {
- UNSECURE_ENVVARS,
+ static const char unsecure_envvars[] =
+ UNSECURE_ENVVARS
#ifdef EXTRA_UNSECURE_ENVVARS
EXTRA_UNSECURE_ENVVARS
#endif
- };
- size_t cnt;
+ ;
+ const char *cp = unsecure_envvars;
- for (cnt = 0;
- cnt < sizeof (unsecure_envvars) / sizeof (unsecure_envvars[0]);
- ++cnt)
- unsetenv (unsecure_envvars[cnt]);
+ while (cp < unsecure_envvars + sizeof (unsecure_envvars))
+ {
+ __unsetenv (cp);
+ cp = (const char *) __rawmemchr (cp, '\0') + 1;
+ }
if (__access ("/etc/suid-debug", F_OK) != 0)
- unsetenv ("MALLOC_CHECK_");
+ __unsetenv ("MALLOC_CHECK_");
}
#ifdef DL_PLATFORM_INIT