chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rtnl: drop "sd_" prefix from cleanup macros
[elogind.git]
/
src
/
detect-virt
/
detect-virt.c
diff --git
a/src/detect-virt/detect-virt.c
b/src/detect-virt/detect-virt.c
index bd3ee452c12e67e1696423cc5fd3bc84160de189..2f8b0ebbbccca01307a2e43719496f69d7f4d7ab 100644
(file)
--- 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' },
{ "container", no_argument, NULL, 'c' },
{ "vm", optional_argument, NULL, 'v' },
{ "quiet", no_argument, NULL, 'q' },
- {
NULL, 0, NULL, 0
}
+ {}
};
int c;
};
int c;
@@
-75,8
+75,7
@@
static int parse_argv(int argc, char *argv[]) {
switch (c) {
case 'h':
switch (c) {
case 'h':
- help();
- return 0;
+ return help();
case ARG_VERSION:
puts(PACKAGE_STRING);
case ARG_VERSION:
puts(PACKAGE_STRING);
@@
-99,8
+98,7
@@
static int parse_argv(int argc, char *argv[]) {
return -EINVAL;
default:
return -EINVAL;
default:
- log_error("Unknown option code %c", c);
- return -EINVAL;
+ assert_not_reached("Unhandled option");
}
}
}
}
@@
-114,8
+112,8
@@
static int parse_argv(int argc, char *argv[]) {
int main(int argc, char *argv[]) {
const char *id = NULL;
int main(int argc, char *argv[]) {
const char *id = NULL;
- int r;
int retval = EXIT_SUCCESS;
int retval = EXIT_SUCCESS;
+ int r;
/* This is mostly intended to be used for scripts which want
* to detect whether we are being run in a virtualized
/* This is mostly intended to be used for scripts which want
* to detect whether we are being run in a virtualized