diff options
Diffstat (limited to 'src/libsystemd/sd-journal/sd-journal.c')
-rw-r--r-- | src/libsystemd/sd-journal/sd-journal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c index 0f3376823b..204886b1e4 100644 --- a/src/libsystemd/sd-journal/sd-journal.c +++ b/src/libsystemd/sd-journal/sd-journal.c @@ -1266,7 +1266,7 @@ static int add_any_file( int fd, const char *path) { - _cleanup_close_ int our_fd = -1; + _cleanup_close_ int our_fd = -EBADF; JournalFile *f; struct stat st; int r; @@ -1730,7 +1730,7 @@ static int add_root_directory(sd_journal *j, const char *p, bool missing_ok) { goto fail; } } else { - _cleanup_close_ int dfd = -1; + _cleanup_close_ int dfd = -EBADF; /* If there's no path specified, then we use the top-level fd itself. We duplicate the fd here, since * opendir() will take possession of the fd, and close it, which we don't want. */ @@ -1888,8 +1888,8 @@ static sd_journal *journal_new(int flags, const char *path, const char *namespac return NULL; j->original_pid = getpid_cached(); - j->toplevel_fd = -1; - j->inotify_fd = -1; + j->toplevel_fd = -EBADF; + j->inotify_fd = -EBADF; j->flags = flags; j->data_threshold = DEFAULT_DATA_THRESHOLD; |