diff options
author | peter <peter@FreeBSD.org> | 2001-08-13 21:55:04 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-08-13 21:55:04 +0000 |
commit | a28e7a866a2f793613d21b6e886ca49e2c4d3268 (patch) | |
tree | 6f1df6a4074f2c8cd689235d67a14e96420dcc51 | |
parent | d58a143b4f62f3208aacf88e3ce0842a86862a92 (diff) | |
download | FreeBSD-src-a28e7a866a2f793613d21b6e886ca49e2c4d3268.zip FreeBSD-src-a28e7a866a2f793613d21b6e886ca49e2c4d3268.tar.gz |
Initialize infp at main()
-rw-r--r-- | bin/sh/mknodes.c | 3 |
1 files changed, 2 insertions, 1 deletions
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()) { |