Skip to content

Commit

Permalink
locale.c: Simplify S_get_LC_ALL_display
Browse files Browse the repository at this point in the history
The previous enhancements to calculate_LC_ALL_string means this function
can just call it without having to loop itself.
  • Loading branch information
khwilliamson committed May 12, 2023
1 parent dea86d9 commit 0d79d27
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions locale.c
Expand Up @@ -2045,23 +2045,7 @@ S_find_locale_from_environment(pTHX_ const unsigned int index)
STATIC const char *
S_get_LC_ALL_display(pTHX)
{

# ifdef LC_ALL

return querylocale_c(LC_ALL);

# else

const char * curlocales[LC_ALL_INDEX_];

for (unsigned i = 0; i < LC_ALL_INDEX_; i++) {
curlocales[i] = querylocale_i(i);
}

return calculate_LC_ALL_string(curlocales);

# endif

return calculate_LC_ALL_string(NULL);
}

#endif
Expand Down

0 comments on commit 0d79d27

Please sign in to comment.