summaryrefslogtreecommitdiff
path: root/src/stdio-bridge
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-03-19 13:03:49 +0100
committerLennart Poettering <lennart@poettering.net>2019-03-19 15:29:44 +0100
commitb6056ea37cda628c2053aa3554ac32502b5223ff (patch)
tree056bd354792fcb3e90d3375674d2335ab0c4ad34 /src/stdio-bridge
parent578e95de48b8f9178be73beb207df29b147d2e0e (diff)
downloadsystemd-b6056ea37cda628c2053aa3554ac32502b5223ff.tar.gz
stdio-bridge: tweak getopt() case statement a bit
Diffstat (limited to 'src/stdio-bridge')
-rw-r--r--src/stdio-bridge/stdio-bridge.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/stdio-bridge/stdio-bridge.c b/src/stdio-bridge/stdio-bridge.c
index 8022d3e596..323191def6 100644
--- a/src/stdio-bridge/stdio-bridge.c
+++ b/src/stdio-bridge/stdio-bridge.c
@@ -62,26 +62,23 @@ static int parse_argv(int argc, char *argv[]) {
switch (c) {
case 'h':
- help();
- return 0;
+ return help();
case ARG_VERSION:
return version();
- case '?':
- return -EINVAL;
-
case 'p':
arg_bus_path = optarg;
-
break;
case 'M':
arg_bus_path = optarg;
-
arg_transport = BUS_TRANSPORT_MACHINE;
-
break;
+
+ case '?':
+ return -EINVAL;
+
default:
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Unknown option code %c", c);