Perl_ck_split: Avoid unnecessary assignment
authorMichael Witten <mfwitten@gmail.com>
Fri, 8 Apr 2011 00:20:48 +0000 (00:20 +0000)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 19 May 2011 13:18:28 +0000 (06:18 -0700)
Signed-off-by: Michael Witten <mfwitten@gmail.com>
op.c

diff --git a/op.c b/op.c
index 8523739..0d4e1e6 100644 (file)
--- a/op.c
+++ b/op.c
@@ -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 */
     }