From 18c95846b01f3feb6ef94209aae1e5ad5b3cdfb0 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Mon, 5 Aug 2013 01:35:36 -0700 Subject: [PATCH] op.c:aassign_common_vars: merge duplicate code We are just asking for bugs to creep in by repeating it like this. --- op.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) 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; -- 2.7.4