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
/
xfiles.c
diff --git
a/src/tools/dumpscan/xfiles.c
b/src/tools/dumpscan/xfiles.c
index
527f89b
..
eaad96f
100644
(file)
--- a/
src/tools/dumpscan/xfiles.c
+++ b/
src/tools/dumpscan/xfiles.c
@@
-198,9
+198,8
@@
xfregister(char *name, afs_uint32(*do_on) (XFILE *, int, char *))
{
struct xftype *x;
- if (!(x = (struct xftype *)malloc(sizeof(struct xftype))))
+ if (!(x = calloc(1, sizeof(struct xftype))))
return ENOMEM;
- memset(x, 0, sizeof(*x));
x->next = xftypes;
x->name = name;
x->do_on = do_on;