summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-08-17 09:01:44 +0100
committerDavid Mitchell <davem@iabyn.com>2016-08-17 09:01:44 +0100
commita54d139f3c5753e3de93051a7a2c1190ed3e7615 (patch)
tree28feb7ef9e3f241427513abb093b5270ba8665d8 /av.c
parent6ffb8402de3d7395c1145d4c773b8536ff0454b2 (diff)
downloadperl-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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/av.c b/av.c
index fc2004ee43..2f819717a7 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;
}