summaryrefslogtreecommitdiff
path: root/src/journal-remote
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal-remote')
-rw-r--r--src/journal-remote/fuzz-journal-remote.c2
-rw-r--r--src/journal-remote/journal-gatewayd.c4
-rw-r--r--src/journal-remote/journal-remote.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/journal-remote/fuzz-journal-remote.c b/src/journal-remote/fuzz-journal-remote.c
index db10c2b012..da0d83ec9a 100644
--- a/src/journal-remote/fuzz-journal-remote.c
+++ b/src/journal-remote/fuzz-journal-remote.c
@@ -19,7 +19,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
int fdin;
void *mem;
_cleanup_(unlink_tempfilep) char name[] = "/tmp/fuzz-journal-remote.XXXXXX.journal";
- _cleanup_close_ int fdout = -1;
+ _cleanup_close_ int fdout = -EBADF;
_cleanup_(sd_journal_closep) sd_journal *j = NULL;
_cleanup_(journal_remote_server_destroy) RemoteServer s = {};
int r;
diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c
index b3b44bceb8..747e0be743 100644
--- a/src/journal-remote/journal-gatewayd.c
+++ b/src/journal-remote/journal-gatewayd.c
@@ -127,7 +127,7 @@ static int request_meta_ensure_tmp(RequestMeta *m) {
if (m->tmp)
rewind(m->tmp);
else {
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
fd = open_tmpfile_unlinkable("/tmp", O_RDWR|O_CLOEXEC);
if (fd < 0)
@@ -670,7 +670,7 @@ static int request_handler_file(
const char *mime_type) {
_cleanup_(MHD_destroy_responsep) struct MHD_Response *response = NULL;
- _cleanup_close_ int fd = -1;
+ _cleanup_close_ int fd = -EBADF;
struct stat st;
assert(connection);
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
index 3d7b552e95..a670468884 100644
--- a/src/journal-remote/journal-remote.c
+++ b/src/journal-remote/journal-remote.c
@@ -294,7 +294,7 @@ int journal_remote_add_raw_socket(RemoteServer *s, int fd) {
if (r < 0)
return r;
- fd_ = -1;
+ fd_ = -EBADF;
s->active++;
return 0;
}
@@ -483,7 +483,7 @@ static int accept_connection(
SocketAddress *addr,
char **hostname) {
- _cleanup_close_ int fd2 = -1;
+ _cleanup_close_ int fd2 = -EBADF;
int r;
log_debug("Accepting new %s connection on fd:%d", type, fd);