summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hv.c b/hv.c
index 9d619d006a..af722f6802 100644
--- a/hv.c
+++ b/hv.c
@@ -1100,7 +1100,7 @@ STATIC void
S_hsplit(pTHX_ HV *hv, STRLEN const oldsize, STRLEN newsize)
{
dVAR;
- STRLEN i;
+ STRLEN i = 0;
char *a = (char*) HvARRAY(hv);
HE **aep;
@@ -1129,7 +1129,7 @@ S_hsplit(pTHX_ HV *hv, STRLEN const oldsize, STRLEN newsize)
return;
aep = (HE**)a;
- for (i=0; i<oldsize; i++) {
+ do {
HE **oentry = aep + i;
HE *entry = aep[i];
@@ -1147,7 +1147,7 @@ S_hsplit(pTHX_ HV *hv, STRLEN const oldsize, STRLEN newsize)
}
entry = *oentry;
} while (entry);
- }
+ } while (i++ < oldsize);
}
void