From 7c635dcb2f43529bbe7903f5a6ce56984d21b964 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Tue, 26 Feb 2008 16:44:29 +1100 Subject: dtc: Fix error reporting in push_input_file() Error reporting in push_input_file() is a mess. One error results in a message and exit(1), others result in a message and return 0 - which is turned into an exit(1) at one callsite. The other callsite doesn't check errors, but probably should. One of the error conditions gives a message, but can only be the result of an internal programming error, not a user error. So. Clean that up by making push_input_file() a void function, using die() to report errors and quit. Signed-off-by: David Gibson --- srcpos.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'srcpos.h') diff --git a/srcpos.h b/srcpos.h index 3ed2334..d548c09 100644 --- a/srcpos.h +++ b/srcpos.h @@ -75,7 +75,7 @@ extern void yyerrorf(char const *, ...) __attribute__((format(printf, 1, 2))); extern struct dtc_file *srcpos_file; -extern int push_input_file(const char *filename); +extern void push_input_file(const char *filename); extern int pop_input_file(void); struct search_path { -- cgit v1.2.3-59-g8ed1b