From 895377c6e96ec8ac853568eb275043741a7621cd Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 13 Oct 2015 17:16:43 +0200 Subject: trafgen: Don't panic() on parser errors If the C preprocessor is used to parse the packet description, a temporary file is created which is not deleted if an error occurs during parsing in compile_packets(). Instead, don't panic() on errors and only print a message, and only die() once we cleaned up after us. Signed-off-by: Tobias Klauser --- trafgen_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'trafgen_conf.h') diff --git a/trafgen_conf.h b/trafgen_conf.h index 3922d15..01d249d 100644 --- a/trafgen_conf.h +++ b/trafgen_conf.h @@ -45,7 +45,7 @@ struct packet_dyn { size_t slen; }; -extern int compile_packets(char *file, int verbose, int cpu, bool invoke_cpp); +extern void compile_packets(char *file, int verbose, int cpu, bool invoke_cpp); extern void cleanup_packets(void); #endif /* TRAFGEN_CONF */ -- cgit v1.2.3-54-g00ecf