From: Alan Coopersmith Date: Sat, 3 Feb 2024 02:09:18 +0000 (-0800) Subject: lib/c_strtod: fix uselocale() fallback if strtod_l() is not available X-Git-Tag: v2.41-devel~2^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aa3cab8e8bc41bcbeb11fee98e466295b216ee1e;p=thirdparty%2Futil-linux.git lib/c_strtod: fix uselocale() fallback if strtod_l() is not available Signed-off-by: Alan Coopersmith --- diff --git a/lib/c_strtod.c b/lib/c_strtod.c index d25ee27749..d7d8cbef4a 100644 --- a/lib/c_strtod.c +++ b/lib/c_strtod.c @@ -50,10 +50,10 @@ double c_strtod(char const *str, char **end) return strtod_l(str, end, cl); #elif defined(HAVE_USELOCALE) /* - * B) classic strtod(), but switch to "C" locale by uselocal() + * B) classic strtod(), but switch to "C" locale by uselocale() */ if (cl) { - locale_t org_cl = uselocale(locale); + locale_t org_cl = uselocale(cl); if (!org_cl) return 0;