This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
SvREFCNT_inc already checks if the SV is non-NULL
authorVincent Pit <vince@profvince.com>
Sun, 8 Nov 2009 15:13:22 +0000 (16:13 +0100)
committerVincent Pit <perl@profvince.com>
Sun, 8 Nov 2009 15:14:00 +0000 (16:14 +0100)
op.c

diff --git a/op.c b/op.c
index 43cbc07..573b67b 100644 (file)
--- a/op.c
+++ b/op.c
@@ -575,8 +575,7 @@ Perl_op_clear(pTHX_ OP *o)
                        && PL_curpad
 #endif
                        ? cGVOPo_gv : NULL;
-           if (gv)
-               SvREFCNT_inc(gv);
+           SvREFCNT_inc_simple_void(gv);
 #ifdef USE_ITHREADS
            if (cPADOPo->op_padix > 0) {
                /* No GvIN_PAD_off(cGVOPo_gv) here, because other references