Skip to content

Commit

Permalink
locale.c: Combine two condiionals to rm special case
Browse files Browse the repository at this point in the history
The case removed is handled transparently below.
  • Loading branch information
khwilliamson committed May 22, 2023
1 parent 1c5429b commit 734ed0f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions locale.c
Expand Up @@ -3561,11 +3561,7 @@ S_win32_setlocale(pTHX_ int category, const char* locale)
* use the particular category's variable if set; otherwise to use the LANG
* variable. */

if (locale == NULL) {
return wrap_wsetlocale(category, NULL);
}

if (strEQ(locale, "")) {
if (locale != NULL && strEQ(locale, "")) {
/* Note this function may change the locale, but that's ok because we
* are about to change it anyway */
locale = find_locale_from_environment(get_category_index(category));
Expand Down

0 comments on commit 734ed0f

Please sign in to comment.