From: Rafael Garcia-Suarez Date: Tue, 9 May 2006 13:10:01 +0000 (+0000) Subject: Fix a logic error in conditional found by Coverity X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=735fec840d57c71a7d7fbdc8ecb199c92bb3f870;p=p5sagit%2Fp5-mst-13.2.git Fix a logic error in conditional found by Coverity p4raw-id: //depot/perl@28136 --- diff --git a/op.c b/op.c index c27d785..a866fcb 100644 --- a/op.c +++ b/op.c @@ -6416,6 +6416,7 @@ Perl_ck_fun(pTHX_ OP *o) else if (kid->op_type == OP_AELEM || kid->op_type == OP_HELEM) { + OP *firstop; OP *op = ((BINOP*)kid)->op_first; name = NULL; if (op) { @@ -6425,10 +6426,10 @@ Perl_ck_fun(pTHX_ OP *o) "[]" : "{}"; if (((op->op_type == OP_RV2AV) || (op->op_type == OP_RV2HV)) && - (op = ((UNOP*)op)->op_first) && - (op->op_type == OP_GV)) { + (firstop = ((UNOP*)op)->op_first) && + (firstop->op_type == OP_GV)) { /* packagevar $a[] or $h{} */ - GV * const gv = cGVOPx_gv(op); + GV * const gv = cGVOPx_gv(firstop); if (gv) tmpstr = Perl_newSVpvf(aTHX_