From: Rafael Garcia-Suarez Date: Thu, 19 Apr 2007 17:28:38 +0000 (+0000) Subject: Simpler version, and that zeroes the allocated memory X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=183086bed615206c8d847db3e3e9fcf0cfd1ea53;p=p5sagit%2Fp5-mst-13.2.git Simpler version, and that zeroes the allocated memory p4raw-id: //depot/perl@30988 --- diff --git a/mro.c b/mro.c index 9a750fe..1fa2a37 100644 --- a/mro.c +++ b/mro.c @@ -31,7 +31,7 @@ Perl_mro_meta_init(pTHX_ HV* stash) assert(stash); assert(HvAUX(stash)); assert(!(HvAUX(stash)->xhv_mro_meta)); - Newxc(newmeta, sizeof(struct mro_meta), char, struct mro_meta); + Newxz(newmeta, 1, struct mro_meta); HvAUX(stash)->xhv_mro_meta = newmeta; newmeta->sub_generation = 1; @@ -58,7 +58,7 @@ Perl_mro_meta_dup(pTHX_ struct mro_meta* smeta, CLONE_PARAMS* param) assert(smeta); - Newxc(newmeta, sizeof(struct mro_meta), char, struct mro_meta); + Newxz(newmeta, 1, struct mro_meta); newmeta->mro_which = smeta->mro_which; newmeta->sub_generation = smeta->sub_generation;