diff options
author | David Mitchell <davem@iabyn.com> | 2016-08-17 09:01:44 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-08-17 09:01:44 +0100 |
commit | a54d139f3c5753e3de93051a7a2c1190ed3e7615 (patch) | |
tree | 28feb7ef9e3f241427513abb093b5270ba8665d8 /av.c | |
parent | 6ffb8402de3d7395c1145d4c773b8536ff0454b2 (diff) | |
download | perl-a54d139f3c5753e3de93051a7a2c1190ed3e7615.tar.gz |
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.
Diffstat (limited to 'av.c')
-rw-r--r-- | av.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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; } |