journal-remote: fix parsing of fd command line argument

This commit is contained in:
Lennart Poettering 2014-08-11 18:24:43 +02:00
parent fd006cce38
commit d7bf74d9cc

View file

@ -795,11 +795,12 @@ static int fd_fd(const char *spec) {
r = safe_atoi(spec, &fd); r = safe_atoi(spec, &fd);
if (r < 0) if (r < 0)
return r; return r;
if (fd < 0)
return -EINVAL;
return -1; return fd;
} }
static int remoteserver_init(RemoteServer *s, static int remoteserver_init(RemoteServer *s,
const char* key, const char* key,
const char* cert, const char* cert,
@ -809,7 +810,6 @@ static int remoteserver_init(RemoteServer *s,
assert(s); assert(s);
if ((arg_listen_raw || arg_listen_http) && trust) { if ((arg_listen_raw || arg_listen_http) && trust) {
log_error("Option --trust makes all non-HTTPS connections untrusted."); log_error("Option --trust makes all non-HTTPS connections untrusted.");
return -EINVAL; return -EINVAL;