Fix uninitialized variables.

This commit is contained in:
hira 2006-09-05 12:11:27 +00:00
parent 2a48f4de87
commit fadb259b4d
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: parse.c,v 1.20 2006/08/26 18:17:42 christos Exp $ */ /* $NetBSD: parse.c,v 1.21 2006/09/05 12:11:27 hira Exp $ */
/* /*
* Copyright (c) 1989, 1993 * Copyright (c) 1989, 1993
@ -38,7 +38,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)parse.c 8.1 (Berkeley) 6/6/93"; static char sccsid[] = "@(#)parse.c 8.1 (Berkeley) 6/6/93";
#else #else
__RCSID("$NetBSD: parse.c,v 1.20 2006/08/26 18:17:42 christos Exp $"); __RCSID("$NetBSD: parse.c,v 1.21 2006/09/05 12:11:27 hira Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -93,7 +93,7 @@ add(const char *fmt)
const char *savep; const char *savep;
/* start new linked list of format units */ /* start new linked list of format units */
tfs = emalloc(sizeof(FS)); tfs = ecalloc(1, sizeof(FS));
if (!fshead) if (!fshead)
fshead = tfs; fshead = tfs;
else else
@ -109,7 +109,7 @@ add(const char *fmt)
break; break;
/* allocate a new format unit and link it in */ /* allocate a new format unit and link it in */
tfu = emalloc(sizeof(FU)); tfu = ecalloc(1, sizeof(FU));
*nextfu = tfu; *nextfu = tfu;
nextfu = &tfu->nextfu; nextfu = &tfu->nextfu;
tfu->reps = 1; tfu->reps = 1;