summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/main.c b/main.c
index 0fdcc6f..a08fa44 100644
--- a/main.c
+++ b/main.c
@@ -42,7 +42,7 @@
bool verbose = false;
-static void usage(const int status)
+static void usage_and_exit(const int status)
{
fprintf(stdout, "Usage: %s [OPTION...] IMAGE\n"
" -c CMDLINE, --cmdline=CMDLINE\n"
@@ -146,11 +146,12 @@ int main(int argc, char *argv[])
case 'V':
info("%s %s\n", PROGRAM_NAME, PROGRAM_VERSION);
exit(EXIT_SUCCESS);
+ /* never reached */
case 'h':
- usage(EXIT_SUCCESS);
- break;
+ usage_and_exit(EXIT_SUCCESS);
+ /* never reached */
default:
- usage(EXIT_FAILURE);
+ usage_and_exit(EXIT_FAILURE);
}
}