aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2011-04-16 10:29:54 +0000
committerThierry Vignaud <tv@mageia.org>2011-04-16 10:29:54 +0000
commitc8bd8f93a8a9c91d69f63f626ffe6d544068e21c (patch)
tree19deb72188744dbbb36c62ec532c92961fab4b6f
parentf4c504acf2520f4765bcc5c2294065c72989b777 (diff)
downloadperl-URPM-c8bd8f93a8a9c91d69f63f626ffe6d544068e21c.tar
perl-URPM-c8bd8f93a8a9c91d69f63f626ffe6d544068e21c.tar.gz
perl-URPM-c8bd8f93a8a9c91d69f63f626ffe6d544068e21c.tar.bz2
perl-URPM-c8bd8f93a8a9c91d69f63f626ffe6d544068e21c.tar.xz
perl-URPM-c8bd8f93a8a9c91d69f63f626ffe6d544068e21c.zip
(spec2srcheader) replace malloc()+memset() by calloc()
-rw-r--r--URPM.xs3
1 files changed, 1 insertions, 2 deletions
diff --git a/URPM.xs b/URPM.xs
index e515cc7..9e36e24 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -3858,8 +3858,7 @@ Urpm_spec2srcheader(specfile)
if (! header)
initSourceHeader(spec);
#endif
- pkg = (URPM__Package)malloc(sizeof(struct s_Package));
- memset(pkg, 0, sizeof(struct s_Package));
+ pkg = (URPM__Package)calloc(1, sizeof(struct s_Package));
headerPutString(header, RPMTAG_SOURCERPM, "");
{