summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorTye McQueen <tye@metronet.com>2003-05-01 08:34:50 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2003-05-05 15:42:58 +0000
commit462d8b025fb2f0b0f3b03c2b1a0b9a1d4406346c (patch)
tree3e0b02cbc141052cc761c7618f818422a170ca65 /hv.c
parent5d52526064b604c74aa71e290350de1a5cf94862 (diff)
downloadperl-462d8b025fb2f0b0f3b03c2b1a0b9a1d4406346c.tar.gz
Re: hv.c patch - pathological hashes too easy
From: "Tye McQueen" <tye@metronet.com> Message-Id: <200305011834.h41IYoE08503@metronet.com> p4raw-id: //depot/perl@19423
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hv.c b/hv.c
index 5abfc62eaf..e018a75eb3 100644
--- a/hv.c
+++ b/hv.c
@@ -703,8 +703,8 @@ Perl_hv_store_flags(pTHX_ HV *hv, const char *key, I32 klen, SV *val,
xhv->xhv_keys++; /* HvKEYS(hv)++ */
if (i) { /* initial entry? */
xhv->xhv_fill++; /* HvFILL(hv)++ */
- if (xhv->xhv_keys > (IV)xhv->xhv_max /* HvKEYS(hv) > HvMAX(hv) */)
- hsplit(hv);
+ } else if (xhv->xhv_keys > (IV)xhv->xhv_max /* HvKEYS(hv) > HvMAX(hv) */) {
+ hsplit(hv);
}
return &HeVAL(entry);