diff options
Diffstat (limited to 'locale')
-rw-r--r-- | locale/programs/ld-time.c | 6 | ||||
-rw-r--r-- | locale/setlocale.c | 15 |
2 files changed, 9 insertions, 12 deletions
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c index 1b118ae..6f961b6 100644 --- a/locale/programs/ld-time.c +++ b/locale/programs/ld-time.c @@ -548,11 +548,11 @@ time_output (struct localedef_t *locale, const char *output_path) ++last_idx; #if __BYTE_ORDER == __LITTLE_ENDIAN -# define ERA_B1 time->era_entries -# define ERA_B2 time->era_entries_ob -#else # define ERA_B1 time->era_entries_ob # define ERA_B2 time->era_entries +#else +# define ERA_B1 time->era_entries +# define ERA_B2 time->era_entries_ob #endif idx[1 + last_idx] = idx[last_idx]; for (num = 0; num < time->cur_num_era; ++num) diff --git a/locale/setlocale.c b/locale/setlocale.c index 76320f8..ceec1a6 100644 --- a/locale/setlocale.c +++ b/locale/setlocale.c @@ -227,6 +227,7 @@ setlocale (int category, const char *locale) { char *locale_path; size_t locale_path_len; + const char *locpath_var; char *composite; /* Sanity check for CATEGORY argument. */ @@ -248,15 +249,11 @@ setlocale (int category, const char *locale) locale_path = NULL; locale_path_len = 0; - if (!__libc_enable_secure) - { - char *locpath_var = getenv ("LOCPATH"); - - if (locpath_var != NULL && locpath_var[0] != '\0') - if (__argz_create_sep (locpath_var, ':', - &locale_path, &locale_path_len) != 0) - return NULL; - } + locpath_var = __secure_getenv ("LOCPATH"); + if (locpath_var != NULL && locpath_var[0] != '\0') + if (__argz_create_sep (locpath_var, ':', + &locale_path, &locale_path_len) != 0) + return NULL; if (__argz_append (&locale_path, &locale_path_len, LOCALE_PATH, sizeof (LOCALE_PATH)) != 0) |