From: Father Chrysostomos Date: Mon, 5 Aug 2013 08:35:36 +0000 (-0700) Subject: op.c:aassign_common_vars: merge duplicate code X-Git-Tag: upstream/5.20.0~2490 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=18c95846b01f3feb6ef94209aae1e5ad5b3cdfb0;p=platform%2Fupstream%2Fperl.git op.c:aassign_common_vars: merge duplicate code We are just asking for bugs to creep in by repeating it like this. --- diff --git a/op.c b/op.c index bad77d5..183e10d 100644 --- a/op.c +++ b/op.c @@ -5452,24 +5452,20 @@ S_aassign_common_vars(pTHX_ OP* o) return TRUE; } else if (curop->op_type == OP_PUSHRE) { + GV *const gv = #ifdef USE_ITHREADS - if (((PMOP*)curop)->op_pmreplrootu.op_pmtargetoff) { - GV *const gv = MUTABLE_GV(PAD_SVl(((PMOP*)curop)->op_pmreplrootu.op_pmtargetoff)); - if (gv == PL_defgv - || (int)GvASSIGN_GENERATION(gv) == PL_generation) - return TRUE; - GvASSIGN_GENERATION_set(gv, PL_generation); - } + ((PMOP*)curop)->op_pmreplrootu.op_pmtargetoff + ? MUTABLE_GV(PAD_SVl(((PMOP*)curop)->op_pmreplrootu.op_pmtargetoff)) + : NULL; #else - GV *const gv - = ((PMOP*)curop)->op_pmreplrootu.op_pmtargetgv; + ((PMOP*)curop)->op_pmreplrootu.op_pmtargetgv; +#endif if (gv) { if (gv == PL_defgv || (int)GvASSIGN_GENERATION(gv) == PL_generation) return TRUE; GvASSIGN_GENERATION_set(gv, PL_generation); } -#endif } else return TRUE;