From: Lennart Poettering Date: Tue, 7 Feb 2023 10:06:31 +0000 (+0100) Subject: journal: minor modernizations X-Git-Tag: v253-rc3~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9eba03c7b10fe98e0443508402b3f9804230453e;p=thirdparty%2Fsystemd.git journal: minor modernizations --- diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c index c297f06d725..659e1e4e348 100644 --- a/src/libsystemd/sd-journal/sd-journal.c +++ b/src/libsystemd/sd-journal/sd-journal.c @@ -2606,28 +2606,23 @@ _public_ int sd_journal_wait(sd_journal *j, uint64_t timeout_usec) { if (j->inotify_fd < 0) { JournalFile *f; - /* This is the first invocation, hence create the - * inotify watch */ + /* This is the first invocation, hence create the inotify watch */ r = sd_journal_get_fd(j); if (r < 0) return r; - /* Server might have done some vacuuming while we weren't watching. - Get rid of the deleted files now so they don't stay around indefinitely. */ + /* Server might have done some vacuuming while we weren't watching. Get rid of the deleted + * files now so they don't stay around indefinitely. */ ORDERED_HASHMAP_FOREACH(f, j->files) { r = journal_file_fstat(f); if (r == -EIDRM) remove_file_real(j, f); - else if (r < 0) { - log_debug_errno(r,"Failed to fstat() journal file '%s' : %m", f->path); - continue; - } + else if (r < 0) + log_debug_errno(r, "Failed to fstat() journal file '%s', ignoring: %m", f->path); } - /* The journal might have changed since the context - * object was created and we weren't watching before, - * hence don't wait for anything, and return - * immediately. */ + /* The journal might have changed since the context object was created and we weren't + * watching before, hence don't wait for anything, and return immediately. */ return determine_change(j); }