stdio-bridge: minor coding style cleanup (#37110)

This commit is contained in:
Yu Watanabe
2025-04-13 05:20:12 +09:00
committed by GitHub
+8 -6
View File
@@ -18,9 +18,7 @@
#include "log.h"
#include "main-func.h"
#define DEFAULT_BUS_PATH "unix:path=/run/dbus/system_bus_socket"
static const char *arg_bus_path = DEFAULT_BUS_PATH;
static const char *arg_bus_path = DEFAULT_SYSTEM_BUS_ADDRESS;
static BusTransport arg_transport = BUS_TRANSPORT_LOCAL;
static RuntimeScope arg_runtime_scope = RUNTIME_SCOPE_SYSTEM;
@@ -33,7 +31,7 @@ static int help(void) {
" --system Connect to system bus\n"
" --user Connect to user bus\n"
" -M --machine=CONTAINER Name of local container to connect to\n",
program_invocation_short_name, DEFAULT_BUS_PATH);
program_invocation_short_name, DEFAULT_SYSTEM_BUS_ADDRESS);
return 0;
}
@@ -92,10 +90,14 @@ static int parse_argv(int argc, char *argv[]) {
return -EINVAL;
default:
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Unknown option code %c", c);
assert_not_reached();
}
if (argc > optind)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"%s takes no arguments.",
program_invocation_short_name);
return 1;
}