diff --git a/src/stdio-bridge/stdio-bridge.c b/src/stdio-bridge/stdio-bridge.c index f48b7e574e..71326789cb 100644 --- a/src/stdio-bridge/stdio-bridge.c +++ b/src/stdio-bridge/stdio-bridge.c @@ -92,10 +92,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; }