This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
hv.c: do zeroing via mem wrap check
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 2 May 2006 20:03:01 +0000 (23:03 +0300)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 3 May 2006 08:51:14 +0000 (08:51 +0000)
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);