This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "Add some defensive coding to av_store()"
[perl5.git] / av.c
diff --git a/av.c b/av.c
index f10f124..918844c 100644 (file)
--- a/av.c
+++ b/av.c
@@ -356,8 +356,8 @@ Perl_av_store(pTHX_ AV *av, SSize_t key, SV *val)
        }
        AvFILLp(av) = key;
     }
-    else if (AvREAL(av) && LIKELY(ary[key] != val))
-        SvREFCNT_dec(ary[key]);
+    else if (AvREAL(av))
+       SvREFCNT_dec(ary[key]);
     ary[key] = val;
     if (SvSMAGICAL(av)) {
        const MAGIC *mg = SvMAGIC(av);