summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-01-17 12:44:42 +0100
committerNicholas Clark <nick@ccl4.org>2012-01-17 12:46:44 +0100
commitef8156f500dbf5c96a21512c58184fbca79bcfb7 (patch)
treeb3cf145f9b29006fbf159d48376b86b0a1c7b0bd /hv.c
parent6b3397796da8c60e2c3dddc7355ff1cdc00fe875 (diff)
downloadperl-ef8156f500dbf5c96a21512c58184fbca79bcfb7.tar.gz
In Perl_refcounted_he_fetch_pvn(), eliminate nested ? : ternary operators.
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/hv.c b/hv.c
index f166968195..3fb3975cbc 100644
--- a/hv.c
+++ b/hv.c
@@ -3062,14 +3062,13 @@ Perl_refcounted_he_fetch_pvn(pTHX_ const struct refcounted_he *chain,
memEQ(HEK_KEY(chain->refcounted_he_hek), keypv, keylen) &&
utf8_flag == (HEK_FLAGS(chain->refcounted_he_hek) & HVhek_UTF8)
#endif
- )
- return
- flags & REFCOUNTED_HE_EXISTS
- ? (chain->refcounted_he_data[0] & HVrhek_typemask)
- == HVrhek_delete
- ? NULL
- : &PL_sv_yes
- : sv_2mortal(refcounted_he_value(chain));
+ ) {
+ if (flags & REFCOUNTED_HE_EXISTS)
+ return (chain->refcounted_he_data[0] & HVrhek_typemask)
+ == HVrhek_delete
+ ? NULL : &PL_sv_yes;
+ return sv_2mortal(refcounted_he_value(chain));
+ }
}
return flags & REFCOUNTED_HE_EXISTS ? NULL : &PL_sv_placeholder;
}