X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fdetect-virt%2Fdetect-virt.c;h=8cf8dcfabc08b6262fc111deb2b5af71457e8d41;hp=72ff2a858542efe55ecf40c33ae69c530c3c0404;hb=f27e2d8c0c0c18d5a1be62c87ea89fcd4894fffa;hpb=0fb533a53359cb8d034ec926638896b93f4fa839 diff --git a/src/detect-virt/detect-virt.c b/src/detect-virt/detect-virt.c index 72ff2a858..8cf8dcfab 100644 --- a/src/detect-virt/detect-virt.c +++ b/src/detect-virt/detect-virt.c @@ -62,7 +62,7 @@ static int parse_argv(int argc, char *argv[]) { { "container", no_argument, NULL, 'c' }, { "vm", optional_argument, NULL, 'v' }, { "quiet", no_argument, NULL, 'q' }, - { NULL, 0, NULL, 0 } + {} }; int c; @@ -75,8 +75,7 @@ static int parse_argv(int argc, char *argv[]) { switch (c) { case 'h': - help(); - return 0; + return help(); case ARG_VERSION: puts(PACKAGE_STRING); @@ -99,8 +98,7 @@ static int parse_argv(int argc, char *argv[]) { return -EINVAL; default: - log_error("Unknown option code %c", c); - return -EINVAL; + assert_not_reached("Unhandled option"); } } @@ -131,7 +129,7 @@ int main(int argc, char *argv[]) { switch (arg_mode) { case ANY_VIRTUALIZATION: { - Virtualization v; + int v; v = detect_virtualization(&id); if (v < 0) {