summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-05-09 13:10:01 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-05-09 13:10:01 +0000
commit735fec840d57c71a7d7fbdc8ecb199c92bb3f870 (patch)
treee2cdff38656aa3d67e18be2c4cca698481df557f /op.c
parent5db49ba3a175392c88bf67c5576fcca80075f35e (diff)
downloadperl-735fec840d57c71a7d7fbdc8ecb199c92bb3f870.tar.gz
Fix a logic error in conditional found by Coverity
p4raw-id: //depot/perl@28136
Diffstat (limited to 'op.c')
-rw-r--r--op.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/op.c b/op.c
index c27d785268..a866fcbf08 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_