Use calloc() instead of malloc + memset.

MFC after:	2 weeks
This commit is contained in:
delphij 2015-09-29 04:47:31 +00:00
parent f3ace065cb
commit 14220da890

View File

@ -137,9 +137,8 @@ __fts_open_44bsd(char * const *argv, int options,
}
/* 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;