]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: minor modernizations
authorLennart Poettering <lennart@poettering.net>
Tue, 7 Feb 2023 10:06:31 +0000 (11:06 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 7 Feb 2023 19:36:47 +0000 (19:36 +0000)
src/libsystemd/sd-journal/sd-journal.c

index c297f06d725f6fa1c1ed0d8b854779e6b22f828e..659e1e4e348af5fd10f837e878bde62a017f6fc4 100644 (file)
@@ -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);
         }