From 31423d1ce9d902b988c9b38f996718c7095d4315 Mon Sep 17 00:00:00 2001 From: katherine Date: Mon, 27 May 2019 16:29:08 -0700 Subject: implement hash parsing generation --- src/main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 4ec0e75..16fd3d7 100644 --- a/src/main.c +++ b/src/main.c @@ -29,7 +29,6 @@ int main(int argc, char **argv) FILE *fo = stdout; FILE *fi = stdin; const char *finame = "stdin"; - const char *foname; struct parse_result_s pr; struct analyse_result_s ar; @@ -42,9 +41,8 @@ int main(int argc, char **argv) } if (opt_outfile_str() != NULL) { - foname = opt_infile_str(); - fo = fopen(foname, "w"); - TRY(fo != NULL, "could not write to file `%s`", foname); + fo = fopen(opt_outfile_str(), "w"); + TRY(fo != NULL, "could not write to file `%s`", opt_outfile_str()); } pr = parse(fi, finame); -- cgit v1.2.3