From 642906d31fccd6242b381fc1374de6035d7fbd4e Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Tue, 10 Nov 2015 10:53:33 +0200 Subject: bpfc, trafgen: Do not close stdin when "-" is specified Do not perform fclose for stdin fd. Signed-off-by: Vadim Kochan Signed-off-by: Tobias Klauser --- trafgen_parser.y | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'trafgen_parser.y') diff --git a/trafgen_parser.y b/trafgen_parser.y index 21c3454..a05b7e8 100644 --- a/trafgen_parser.y +++ b/trafgen_parser.y @@ -635,7 +635,8 @@ void compile_packets(char *file, bool verbose, unsigned int cpu, bool invoke_cpp ret = 0; err: - fclose(yyin); + if (yyin != stdin) + fclose(yyin); if (invoke_cpp) unlink(tmp_file); -- cgit v1.2.3-54-g00ecf