From: Nicholas Clark Date: Mon, 6 Feb 2006 21:40:57 +0000 (+0000) Subject: Given that the memory allocated in Perl_bytes_from_utf8 and X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=212542aaa22ee7b99a683bacf00fb323b1c34697;p=p5sagit%2Fp5-mst-13.2.git Given that the memory allocated in Perl_bytes_from_utf8 and Perl_bytes_to_utf8 will immediately be written to, I see no need to allocate it zeroed. p4raw-id: //depot/perl@27112 --- diff --git a/utf8.c b/utf8.c index d953330..e3d8d09 100644 --- a/utf8.c +++ b/utf8.c @@ -852,7 +852,7 @@ Perl_bytes_from_utf8(pTHX_ const U8 *s, STRLEN *len, bool *is_utf8) *is_utf8 = 0; - Newxz(d, (*len) - count + 1, U8); + Newx(d, (*len) - count + 1, U8); s = start; start = d; while (s < send) { U8 c = *s++; @@ -888,7 +888,7 @@ Perl_bytes_to_utf8(pTHX_ const U8 *s, STRLEN *len) U8 *d; U8 *dst; - Newxz(d, (*len) * 2 + 1, U8); + Newx(d, (*len) * 2 + 1, U8); dst = d; while (s < send) {