From: Father Chrysostomos Date: Sat, 2 Nov 2013 19:38:41 +0000 (-0700) Subject: pp_sort.c: Remove useless assignments; reduce var scope X-Git-Tag: upstream/5.20.0~1385 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5a34f1cdd2a19f0ff733c8488b899233b60188db;p=platform%2Fupstream%2Fperl.git pp_sort.c: Remove useless assignments; reduce var scope 6cda7db16df9 stopped the value of the stash variable from being used, so there is no longer any need to assign to it. sv_2cv, however, requires an HV ** argument, so we cannot eliminate it completely. --- diff --git a/pp_sort.c b/pp_sort.c index e517bc4..c8fe08e 100644 --- a/pp_sort.c +++ b/pp_sort.c @@ -1479,7 +1479,6 @@ PP(pp_sort) SV **p1 = ORIGMARK+1, **p2; SSize_t max, i; AV* av = NULL; - HV *stash; GV *gv; CV *cv = NULL; I32 gimme = GIMME; @@ -1517,10 +1516,10 @@ PP(pp_sort) kid = kUNOP->op_first; /* pass rv2gv */ kid = kUNOP->op_first; /* pass leave */ PL_sortcop = kid->op_next; - stash = CopSTASH(PL_curcop); } else { GV *autogv = NULL; + HV *stash; cv = sv_2cv(*++MARK, &stash, &gv, GV_ADD); check_cv: if (cv && SvPOK(cv)) { @@ -1568,7 +1567,6 @@ PP(pp_sort) } else { PL_sortcop = NULL; - stash = CopSTASH(PL_curcop); } /* optimiser converts "@a = sort @a" to "sort \@a";