This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Use synonym name for clarity
authorKarl Williamson <khw@cpan.org>
Sat, 24 Sep 2022 12:10:34 +0000 (06:10 -0600)
committerKarl Williamson <khw@cpan.org>
Wed, 28 Sep 2022 15:58:18 +0000 (09:58 -0600)
At this point we have two variables which we just set equal.  Change
here to use the synonym that doesn't require looking elsewhere to
understand what's going on.

locale.c

index 95c6f58..6ca95dd 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -1290,7 +1290,7 @@ S_emulate_setlocale_i(pTHX_
              * doesn't necessarily accept it as input (the results are
              * undefined).  For PL_C_locale_obj, it is so that it never gets
              * modified, as otherwise newlocale() is free to do so */
-            basis_obj = duplocale(entry_obj);
+            basis_obj = duplocale(basis_obj);
             if (! basis_obj) {
                 locale_panic_(Perl_form(aTHX_ "(%" LINE_Tf "): duplocale failed",
                                               line));