From 2357bae7a0b405c6c8c0667303468707f4cd32f8 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sat, 22 Dec 2012 23:24:13 -0800 Subject: [PATCH] mg.c: Use SvREFCNT_dec_NN Using SvREFCNT_dec_NN in a couple of places eliminates needless null checks. --- mg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mg.c b/mg.c index 5f0f758..b5ff8f7 100644 --- a/mg.c +++ b/mg.c @@ -3181,7 +3181,7 @@ cleanup: /* pop any of SAVEFREESV, SAVEDESTRUCTOR_X and "save in progress" */ PL_savestack_ix = old_ss_ix; if (flags & 8) - SvREFCNT_dec(sv); + SvREFCNT_dec_NN(sv); PL_op = myop; /* Apparently not needed... */ PL_Sv = tSv; /* Restore global temporaries. */ @@ -3247,7 +3247,7 @@ S_restore_magic(pTHX_ const void *p) SvTEMP_off(sv); } else - SvREFCNT_dec(sv); /* undo the inc in S_save_magic() */ + SvREFCNT_dec_NN(sv); /* undo the inc in S_save_magic() */ } } -- 2.7.4