diff options
author | delphij <delphij@FreeBSD.org> | 2012-08-01 00:21:55 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2012-08-01 00:21:55 +0000 |
commit | dc040356951ccf5c9e9fab8c348e87e5dcc818c1 (patch) | |
tree | bad0e36082f5f94edd49d5ac2e1e1ed6dd276847 /lib/libc | |
parent | 95def5f92715471273ac714df214e1788b4b0773 (diff) | |
download | FreeBSD-src-dc040356951ccf5c9e9fab8c348e87e5dcc818c1.zip FreeBSD-src-dc040356951ccf5c9e9fab8c348e87e5dcc818c1.tar.gz |
Use calloc().
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/fts.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index 153b8da..afaa057 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -134,9 +134,8 @@ fts_open(argv, options, compar) } /* Allocate/initialize the stream. */ - if ((priv = malloc(sizeof(*priv))) == NULL) + if ((priv = calloc(1, sizeof(*priv))) == NULL) return (NULL); - memset(priv, 0, sizeof(*priv)); sp = &priv->ftsp_fts; sp->fts_compar = compar; sp->fts_options = options; |