diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c index decb6df5da..c6123146a5 100644 --- a/src/journal-remote/journal-upload.c +++ b/src/journal-remote/journal-upload.c @@ -776,8 +776,6 @@ static int parse_argv(int argc, char *argv[]) { assert(argc >= 0); assert(argv); - opterr = 0; - while ((c = getopt_long(argc, argv, "hu:mM:D:", options, NULL)) >= 0) switch (c) { case 'h': @@ -882,14 +880,7 @@ static int parse_argv(int argc, char *argv[]) { break; case '?': - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), - "Unknown option %s.", - argv[optind - 1]); - - case ':': - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), - "Missing argument to %s.", - argv[optind - 1]); + return -EINVAL; default: assert_not_reached();