This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
utf8.c: Add missing {}
authorKarl Williamson <khw@cpan.org>
Wed, 9 Mar 2016 01:39:46 +0000 (18:39 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 9 Mar 2016 16:28:40 +0000 (09:28 -0700)
which caused an if's scope to be less than intended.

Spotted by Jarkko Hietaniemi using gcc 6 with the
'-Wmisleading-indentation' option

utf8.c

diff --git a/utf8.c b/utf8.c
index 3778d76..6249ea5 100644 (file)
--- a/utf8.c
+++ b/utf8.c
@@ -2740,7 +2740,7 @@ Perl__core_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 m
            CopHINTS_set(PL_curcop, PL_hints);
        }
        if (!SvROK(retval) || SvTYPE(SvRV(retval)) != SVt_PVHV) {
-           if (SvPOK(retval))
+           if (SvPOK(retval)) {
 
                /* If caller wants to handle missing properties, let them */
                if (flags_p && *flags_p & _CORE_SWASH_INIT_RETURN_IF_UNDEF) {
@@ -2750,6 +2750,7 @@ Perl__core_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 m
                           "Can't find Unicode property definition \"%"SVf"\"",
                           SVfARG(retval));
                 NOT_REACHED; /* NOTREACHED */
+            }
        }
     } /* End of calling the module to find the swash */