From 9b3375c17c24f01347cb61995ba89d8e86c69f59 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Thu, 16 Nov 2023 07:57:17 -0700 Subject: [PATCH] locale.c: Reorder some statements in a switch() This unifies the common text in two case: statements, and makes all of them do their business in the same order. This makes it easier to compare and contrast the actions of the various case:s --- locale.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/locale.c b/locale.c index 5aa48f42c834..f6d714009ae4 100644 --- a/locale.c +++ b/locale.c @@ -5542,31 +5542,30 @@ S_my_localeconv(pTHX_ const int item) # ifdef USE_LOCALE_NUMERIC case RADIXCHAR: - locale = numeric_locale = PL_numeric_name; - index_bits = OFFSET_TO_BIT(NUMERIC_OFFSET); strings[NUMERIC_OFFSET] = DECIMAL_POINT_ADDRESS; - integers = NULL; - break; + goto numeric_common; case THOUSEP: - index_bits = OFFSET_TO_BIT(NUMERIC_OFFSET); - locale = numeric_locale = PL_numeric_name; strings[NUMERIC_OFFSET] = thousands_sep_string; + + numeric_common: integers = NULL; + index_bits = OFFSET_TO_BIT(NUMERIC_OFFSET); + locale = numeric_locale = PL_numeric_name; break; # endif # ifdef USE_LOCALE_MONETARY case CRNCYSTR: - index_bits = OFFSET_TO_BIT(MONETARY_OFFSET); - locale = monetary_locale = querylocale_i(LC_MONETARY_INDEX_); - /* This item needs the values for both the currency symbol, and * another one used to construct the nl_langino()-compatible * return. */ strings[MONETARY_OFFSET] = CURRENCY_SYMBOL_ADDRESS; integers = P_CS_PRECEDES_ADDRESS; + + index_bits = OFFSET_TO_BIT(MONETARY_OFFSET); + locale = monetary_locale = querylocale_i(LC_MONETARY_INDEX_); break; # endif