Turn a for loop that's almost a while into an honest-to-goodness while.
Nicholas Clark [Sat, 31 Dec 2005 17:24:34 +0000 (17:24 +0000)]
p4raw-id: //depot/perl@26552

hv.c

diff --git a/hv.c b/hv.c
index 69c951c..918404c 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -1610,9 +1610,9 @@ Perl_hv_clear_placeholders(pTHX_ HV *hv)
        /* Loop down the linked list heads  */
        bool first = 1;
        HE **oentry = &(HvARRAY(hv))[i];
-       HE *entry = *oentry;
+       HE *entry;
 
-       for (; entry; entry = *oentry) {
+       while ((entry = *oentry)) {
            if (HeVAL(entry) == &PL_sv_placeholder) {
                *oentry = HeNEXT(entry);
                if (first && !*oentry)