From 7c5a6c801a43bea6f5934338dfe6b8c757733c42 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 21 Feb 2021 09:57:36 -0700 Subject: [PATCH] locale.c: Reorder code, rmv unneeded conditional Previous commits have made the conditional about being able to find the radix character unnecessary. The called function my_langinfo_c() handles the case properly. This commit also makes the trivial case first in a conditional, as that is easier to comprehend. --- locale.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/locale.c b/locale.c index 69883526fa2f..a257d9351d7c 100644 --- a/locale.c +++ b/locale.c @@ -1518,8 +1518,11 @@ S_set_numeric_radix(pTHX_ const bool use_locale) /* If 'use_locale' is FALSE, set to use a dot for the radix character. If * TRUE, use the radix character derived from the current locale */ -# if defined(USE_LOCALE_NUMERIC) && ( defined(HAS_SOME_LOCALECONV) \ - || defined(HAS_SOME_LANGINFO)) +# ifndef USE_LOCALE_NUMERIC + + PERL_UNUSED_ARG(use_locale); + +# else int utf8ness = 1; const char * radix; @@ -1544,11 +1547,8 @@ S_set_numeric_radix(pTHX_ const bool use_locale) DEBUG_L(PerlIO_printf(Perl_debug_log, "Locale radix is '%s', ?UTF-8=%d\n", SvPVX(PL_numeric_radix_sv), cBOOL(SvUTF8(PL_numeric_radix_sv)))); -# else - - PERL_UNUSED_ARG(use_locale); -# endif /* USE_LOCALE_NUMERIC and can find the radix char */ +# endif /* USE_LOCALE_NUMERIC */ }