git://git.openafs.org
/
openafs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Use calloc, rather than malloc/memset
[openafs.git]
/
src
/
tools
/
dumpscan
/
xf_profile.c
diff --git
a/src/tools/dumpscan/xf_profile.c
b/src/tools/dumpscan/xf_profile.c
index
d24c72f
..
c926693
100644
(file)
--- a/
src/tools/dumpscan/xf_profile.c
+++ b/
src/tools/dumpscan/xf_profile.c
@@
-136,10
+136,9
@@
xfopen_profile(XFILE * X, int flag, char *xname, char *profile)
PFILE *PF;
afs_uint32 err;
- PF = malloc(sizeof(*PF));
+ PF = calloc(1, sizeof(*PF));
if (!PF)
return ENOMEM;
- memset(PF, 0, sizeof(*PF));
err = xfopen(&PF->profile, O_RDWR | O_CREAT | O_TRUNC, profile);
if (err) {