diff options
author | Michael Witten <mfwitten@gmail.com> | 2011-04-08 00:20:48 +0000 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-05-19 06:18:28 -0700 |
commit | f126b75f4148fff81c891eb4f3eb7a4e6fca9ee3 (patch) | |
tree | 551079d4433927b51c1f2101b7b8473ec9e1b1b3 /op.c | |
parent | f113cf861b647108ad84981d83d24034fd20c6d4 (diff) | |
download | perl-f126b75f4148fff81c891eb4f3eb7a4e6fca9ee3.tar.gz |
Perl_ck_split: Avoid unnecessary assignment
Signed-off-by: Michael Witten <mfwitten@gmail.com>
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -8457,8 +8457,9 @@ Perl_ck_split(pTHX_ OP *o) Perl_croak(aTHX_ "panic: ck_split"); kid = kid->op_sibling; op_free(cLISTOPo->op_first); - cLISTOPo->op_first = kid; - if (!kid) { + if (kid) + cLISTOPo->op_first = kid; + else { cLISTOPo->op_first = kid = newSVOP(OP_CONST, 0, newSVpvs(" ")); cLISTOPo->op_last = kid; /* There was only one element previously */ } |