diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-05-18 13:08:36 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-05-18 13:08:36 +0100 |
commit | b3a120bf72d91507f4a2782bf0be31aa8b4dba31 (patch) | |
tree | e277759deff31a8a371d4312436b3dc7e58c85da /sv.c | |
parent | 45f7fcc88f316d3cfef48062f141b1586354cfec (diff) | |
download | perl-b3a120bf72d91507f4a2782bf0be31aa8b4dba31.tar.gz |
In Perl_ptr_table_new(), fight back against the cult of Newxz().
(There's no need to zero-allocate memory for a structure when you're about to
explicitly allocate every member.)
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -10578,7 +10578,7 @@ Perl_ptr_table_new(pTHX) PTR_TBL_t *tbl; PERL_UNUSED_CONTEXT; - Newxz(tbl, 1, PTR_TBL_t); + Newx(tbl, 1, PTR_TBL_t); tbl->tbl_max = 511; tbl->tbl_items = 0; Newxz(tbl->tbl_ary, tbl->tbl_max + 1, PTR_TBL_ENT_t*); |