Use calloc instead of malloc + memset(.., 0, ..)

MFC after:	5 days
This commit is contained in:
Enji Cooper 2017-01-09 06:03:49 +00:00
parent c5f8d75113
commit 8406423362
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311754

View File

@ -399,12 +399,11 @@ static void
save_typdef(char *name)
{
struct tdef *t;
t = malloc(sizeof(struct tdef));
t = calloc(1, sizeof(struct tdef));
if (t == NULL)
err(1, NULL);
memset(t, 0 , sizeof(struct tdef));
t->name = name;
SLIST_INSERT_HEAD(&tdefs, t, link);
}