diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-01-06 19:43:57 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-01-06 19:43:57 +0000 |
commit | 088d8dc75626570e71924c7cf6c32cb0bd948d59 (patch) | |
tree | 755197fee6251a8976d72b98e45c4a6f0434933d | |
parent | 8d070db39eaa2b957b92e9a0fc0653b2277d7148 (diff) | |
download | perl-URPM-088d8dc75626570e71924c7cf6c32cb0bd948d59.tar perl-URPM-088d8dc75626570e71924c7cf6c32cb0bd948d59.tar.gz perl-URPM-088d8dc75626570e71924c7cf6c32cb0bd948d59.tar.bz2 perl-URPM-088d8dc75626570e71924c7cf6c32cb0bd948d59.tar.xz perl-URPM-088d8dc75626570e71924c7cf6c32cb0bd948d59.zip |
(Urpm_stream2header) use calloc() instead of malloc()+memset()
-rw-r--r-- | URPM.xs | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -3814,8 +3814,7 @@ Urpm_stream2header(fp) URPM__Package pkg; PPCODE: if ((fd = fdDup(fileno(fp)))) { - pkg = (URPM__Package)malloc(sizeof(struct s_Package)); - memset(pkg, 0, sizeof(struct s_Package)); + pkg = (URPM__Package)calloc(1, sizeof(struct s_Package)); pkg->h = headerRead(fd, HEADER_MAGIC_YES); if (pkg->h) { SV *sv_pkg; |