From 7663aa67ebf92f85fdb62aee91f2b6af8c7d9cbb Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Thu, 21 Feb 2013 20:54:48 +0100 Subject: [PATCH] In S_hsplit(), replace a for with a do/while, as the loop runs at least once. Seems pointless to check the exit condition before any iterations, when we know that it will always be false the first time. --- hv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hv.c b/hv.c index 9d619d0..af722f6 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