summaryrefslogtreecommitdiff
path: root/src/binfmt
diff options
context:
space:
mode:
Diffstat (limited to 'src/binfmt')
-rw-r--r--src/binfmt/binfmt.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c
index 9fc5d4e4a..c1c152239 100644
--- a/src/binfmt/binfmt.c
+++ b/src/binfmt/binfmt.c
@@ -122,15 +122,12 @@ static int apply_file(const char *path, bool ignore_enoent) {
return r;
}
-static int help(void) {
-
+static void help(void) {
printf("%s [OPTIONS...] [CONFIGURATION FILE...]\n\n"
"Registers binary formats.\n\n"
" -h --help Show this help\n"
- " --version Show package version\n",
- program_invocation_short_name);
-
- return 0;
+ " --version Show package version\n"
+ , program_invocation_short_name);
}
static int parse_argv(int argc, char *argv[]) {
@@ -150,12 +147,13 @@ static int parse_argv(int argc, char *argv[]) {
assert(argc >= 0);
assert(argv);
- while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) {
+ while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0)
switch (c) {
case 'h':
- return help();
+ help();
+ return 0;
case ARG_VERSION:
puts(PACKAGE_STRING);
@@ -168,7 +166,6 @@ static int parse_argv(int argc, char *argv[]) {
default:
assert_not_reached("Unhandled option");
}
- }
return 1;
}