From a28e7a866a2f793613d21b6e886ca49e2c4d3268 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 13 Aug 2001 21:55:04 +0000 Subject: Initialize infp at main() --- bin/sh/mknodes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/sh/mknodes.c b/bin/sh/mknodes.c index 6fea8ec..ecb8407 100644 --- a/bin/sh/mknodes.c +++ b/bin/sh/mknodes.c @@ -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()) { -- cgit v1.1