In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/a54d139f3c5753e3de93051a7a2c1190ed3e7615?hp=6ffb8402de3d7395c1145d4c773b8536ff0454b2>
- Log ----------------------------------------------------------------- commit a54d139f3c5753e3de93051a7a2c1190ed3e7615 Author: David Mitchell <[email protected]> Date: Wed Aug 17 09:01:44 2016 +0100 av_fetch(): remove redundant condition At the point of testing for !AvARRAY(av)[key] if AvREIFY(av), it's already been confirmed that the array element isn't null. ----------------------------------------------------------------------- Summary of changes: av.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/av.c b/av.c index fc2004e..2f81971 100644 --- a/av.c +++ b/av.c @@ -279,9 +279,8 @@ Perl_av_fetch(pTHX_ AV *av, SSize_t key, I32 lval) return lval ? av_store(av,key,newSV(0)) : NULL; } - if (AvREIFY(av) - && (!AvARRAY(av)[key] /* eg. @_ could have freed elts */ - || SvIS_FREED(AvARRAY(av)[key]))) { + if (AvREIFY(av) && SvIS_FREED(AvARRAY(av)[key])) { + /* eg. @_ could have freed elts */ AvARRAY(av)[key] = NULL; /* 1/2 reify */ goto emptyness; } -- Perl5 Master Repository
