summaryrefslogtreecommitdiff
path: root/srcpos.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2008-02-26 16:44:29 +1100
committerJon Loeliger <jdl@loeliger.com>2008-03-23 08:00:32 -0500
commit7c635dcb2f43529bbe7903f5a6ce56984d21b964 (patch)
tree7b1e362ad8bf0060e9e1faceb58b374d969030b7 /srcpos.h
parent2512a7eb5c755aeb92222748aa6a441c6840325c (diff)
downloaddtc-7c635dcb2f43529bbe7903f5a6ce56984d21b964.tar.gz
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 <david@gibson.dropbear.id.au>
Diffstat (limited to 'srcpos.h')
-rw-r--r--srcpos.h2
1 files changed, 1 insertions, 1 deletions
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 {