]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/c_strtod: fix uselocale() fallback if strtod_l() is not available
authorAlan Coopersmith <alan.coopersmith@oracle.com>
Sat, 3 Feb 2024 02:09:18 +0000 (18:09 -0800)
committerAlan Coopersmith <alan.coopersmith@oracle.com>
Sat, 3 Feb 2024 02:09:18 +0000 (18:09 -0800)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
lib/c_strtod.c

index d25ee2774926b1228f2be0c530796e0c124a5759..d7d8cbef4a50f90bda45fdac24e38a04f99fa68e 100644 (file)
@@ -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;