This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Merge declaration and initialisation of local variable
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Thu, 16 Jul 2015 07:08:19 +0000 (08:08 +0100)
committerTony Cook <tony@develop-help.com>
Wed, 22 Jul 2015 05:25:02 +0000 (15:25 +1000)
Commit 2b32fed8 removed the PUTBACK/SPAGAIN around hv_iterval and
Perl_sv_setpvf, but didn't take the opportunity to merge the
initialisation with the declaration now that there's no code between
them.

doop.c

diff --git a/doop.c b/doop.c
index 22e614a..19fe310 100644 (file)
--- a/doop.c
+++ b/doop.c
@@ -1263,8 +1263,7 @@ Perl_do_kv(pTHX)
            XPUSHs(sv);
        }
        if (dovalues) {
-           SV *tmpstr;
-           tmpstr = hv_iterval(keys,entry);
+           SV *tmpstr = hv_iterval(keys,entry);
            DEBUG_H(Perl_sv_setpvf(aTHX_ tmpstr, "%lu%%%d=%lu",
                            (unsigned long)HeHASH(entry),
                            (int)HvMAX(keys)+1,