summaryrefslogtreecommitdiff
path: root/pp_sort.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-11-02 12:38:41 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-11-04 05:10:18 -0800
commit5a34f1cdd2a19f0ff733c8488b899233b60188db (patch)
tree8bd8293da616961357af9d92738340b7380f11ff /pp_sort.c
parent0845736aa911ed8d7568022034b29a5eeec529a7 (diff)
downloadperl-5a34f1cdd2a19f0ff733c8488b899233b60188db.tar.gz
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.
Diffstat (limited to 'pp_sort.c')
-rw-r--r--pp_sort.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/pp_sort.c b/pp_sort.c
index e517bc42c0..c8fe08e753 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";