From ee07f288fb90ac05492d093b7093b25ca4d97c40 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 28 Mar 2021 06:33:51 -0600 Subject: [PATCH] locale.c: Change a branch into an assert This code should no longer be necessary; but verify --- locale.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/locale.c b/locale.c index 9413b4fe089e..b0f38a547622 100644 --- a/locale.c +++ b/locale.c @@ -1118,6 +1118,7 @@ S_emulate_setlocale_i(pTHX_ PERL_ARGS_ASSERT_EMULATE_SETLOCALE_I; assert(index <= NOMINAL_LC_ALL_INDEX); + assert(new_locale != NULL); /* No longer do queries come through here */ mask = category_masks[index]; @@ -1126,11 +1127,6 @@ S_emulate_setlocale_i(pTHX_ line, index, category_names[index], mask, new_locale, categories[index])); - /* If just querying what the existing locale is ... */ - if (new_locale == NULL) { - return my_querylocale_i(index); - } - # ifndef USE_QUERYLOCALE if (strEQ(new_locale, "")) {