diff options
author | Stefan Weil <sw@weilnetz.de> | 2012-07-12 22:41:43 +0200 |
---|---|---|
committer | Chris E Ferron <chris.e.ferron@linux.intel.com> | 2012-07-17 14:45:25 -0700 |
commit | 2477c917d80efae446386917a830eb539fce789c (patch) | |
tree | f10d5fc79425540ce1a970a8e0dc005f6aa4655f | |
parent | 068433139ae930ec03c5f602b629e0921c484d3b (diff) |
ccstoh: Don't return success if something went wrong
exit(0) is the same as returning EXIT_SUCCESS which is a bad
idea after a severe failure. It will for example result in
wrong behaviour of make (make won't stop after such failures).
Returning EXIT_FAILURE fixes this.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
-rw-r--r-- | src/csstoh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/csstoh.c b/src/csstoh.c index e6b1dcf..28858f5 100644 --- a/src/csstoh.c +++ b/src/csstoh.c @@ -40,12 +40,12 @@ int main(int argc, char **argv) in = fopen(argv[1], "rm"); if (!in) { printf("Failed to open input file %s (%s) \n", argv[1], strerror(errno)); - exit(0); + return EXIT_FAILURE; } out = fopen(argv[2], "wm"); if (!out) { printf("Failed to open output file %s (%s) \n", argv[1], strerror(errno)); - exit(0); + return EXIT_FAILURE; } fprintf(out, "#ifndef __INCLUDE_GUARD_CCS_H\n"); |