summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2010-11-12 17:33:10 +0100
committerTobias Klauser <tklauser@distanz.ch>2010-11-12 17:33:10 +0100
commit6f8db3bda1c2644adfc25b83b73285df9a80585d (patch)
tree3ebdfb9d92e928e7baef0bbd7231fb4d16f74193
parentc9c4555f8d38053ed2da4b0f81fd86301a14d8cb (diff)
Rename usage function
-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);
}
}