X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fmachine-id-setup%2Fmachine-id-setup-main.c;h=85bbfc42991cd1bda21feef04a7237d019ecdf46;hb=e7eb49db071f9aab2a9bad0660962f2aa4d0c7d1;hp=1c933ce600b3cc0e324a8e4a7c0ec0f4254d66a2;hpb=fe970a8a30d611d454cb40025cfc32e29efa34e6;p=elogind.git diff --git a/src/machine-id-setup/machine-id-setup-main.c b/src/machine-id-setup/machine-id-setup-main.c index 1c933ce60..85bbfc429 100644 --- a/src/machine-id-setup/machine-id-setup-main.c +++ b/src/machine-id-setup/machine-id-setup-main.c @@ -31,16 +31,13 @@ static const char *arg_root = ""; -static int help(void) { - +static void help(void) { printf("%s [OPTIONS...]\n\n" "Initialize /etc/machine-id from a random source.\n\n" " -h --help Show this help\n" " --version Show package version\n" " --root=ROOT Filesystem root\n", program_invocation_short_name); - - return 0; } static int parse_argv(int argc, char *argv[]) { @@ -62,12 +59,13 @@ static int parse_argv(int argc, char *argv[]) { assert(argc >= 0); assert(argv); - while ((c = getopt_long(argc, argv, "hqcv", options, NULL)) >= 0) { + while ((c = getopt_long(argc, argv, "hqcv", options, NULL)) >= 0) switch (c) { case 'h': - return help(); + help(); + return 0; case ARG_VERSION: puts(PACKAGE_STRING); @@ -84,7 +82,6 @@ static int parse_argv(int argc, char *argv[]) { default: assert_not_reached("Unhandled option"); } - } if (optind < argc) { log_error("Extraneous arguments");