summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2014-12-25 03:21:47 +0100
committerYves Orton <demerphq@gmail.com>2014-12-25 03:21:47 +0100
commit34f2dd859e2563e188f2f6c301b08ba1ce795d73 (patch)
treedfc9f2cb849654a3629e50a045e79461b9afb05f /hv.c
parent5f2e6de730e40b8a110897a11d3e20407b66a38c (diff)
downloadperl-34f2dd859e2563e188f2f6c301b08ba1ce795d73.tar.gz
Restructure hv_backreferences_p() so assert makes sense
Prior to this patch the assert was meaningless as we would use the argument before we asserted things about it. This patch restructures the logic so we do the asserts first and *then* use the argument.
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hv.c b/hv.c
index 5bab2d7640..731407093b 100644
--- a/hv.c
+++ b/hv.c
@@ -2447,11 +2447,11 @@ Perl_hv_ename_delete(pTHX_ HV *hv, const char *name, U32 len, U32 flags)
AV **
Perl_hv_backreferences_p(pTHX_ HV *hv) {
- struct xpvhv_aux * const iter = SvOOK(hv) ? HvAUX(hv) : hv_auxinit(hv);
-
PERL_ARGS_ASSERT_HV_BACKREFERENCES_P;
-
- return &(iter->xhv_backreferences);
+ {
+ struct xpvhv_aux * const iter = SvOOK(hv) ? HvAUX(hv) : hv_auxinit(hv);
+ return &(iter->xhv_backreferences);
+ }
}
void