hv.c: do zeroing via mem wrap check
Jarkko Hietaniemi [Tue, 2 May 2006 20:03:01 +0000 (23:03 +0300)]
Message-Id: <200605021703.k42H31PF216868@kosh.hut.fi>

p4raw-id: //depot/perl@28075

hv.c

diff --git a/hv.c b/hv.c
index 39fadfc..8630adf 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -1608,8 +1608,7 @@ Perl_hv_clear(pTHX_ HV *hv)
     hfreeentries(hv);
     HvPLACEHOLDERS_set(hv, 0);
     if (HvARRAY(hv))
-       (void)memzero(HvARRAY(hv),
-                     (xhv->xhv_max+1 /* HvMAX(hv)+1 */) * sizeof(HE*));
+       Zero(HvARRAY(hv), xhv->xhv_max+1 /* HvMAX(hv)+1 */, HE*);
 
     if (SvRMAGICAL(hv))
        mg_clear((SV*)hv);