1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-04 12:52:15 +00:00

Initialize infp at main()

This commit is contained in:
Peter Wemm 2001-08-13 21:55:04 +00:00
parent ab01f43385
commit ef15bfc59f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=81602

View File

@ -98,7 +98,7 @@ static struct str *nodestr[MAXTYPES]; /* type of structure used by the node */
static int nstr; /* number of structures */
static struct str str[MAXTYPES]; /* the structures */
static struct str *curstr; /* current structure */
static FILE *infp = stdin;
static FILE *infp;
static char line[1024];
static int linno;
static char *linep;
@ -123,6 +123,7 @@ main(argc, argv)
{
if (argc != 3)
error("usage: mknodes file");
infp = stdin;
if ((infp = fopen(argv[1], "r")) == NULL)
error("Can't open %s: %s", argv[1], strerror(errno));
while (readline()) {