summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/mknodes.c3
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()) {
OpenPOWER on IntegriCloud