]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/journal/journal-authenticate.c
treewide: use log_*_errno whenever %m is in the format string
[thirdparty/systemd.git] / src / journal / journal-authenticate.c
index f416b79a34ca3962c317c04e7e3f72aeda05f935..f9bd686c11a4965cc7a955c9120e061136d946e8 100644 (file)
@@ -339,7 +339,7 @@ int journal_file_fss_load(JournalFile *f) {
         fd = open(p, O_RDWR|O_CLOEXEC|O_NOCTTY, 0600);
         if (fd < 0) {
                 if (errno != ENOENT)
-                        log_error("Failed to open %s: %m", p);
+                        log_error_errno(errno, "Failed to open %s: %m", p);
 
                 r = -errno;
                 goto finish;
@@ -418,10 +418,9 @@ finish:
         if (m)
                 munmap(m, PAGE_ALIGN(sizeof(FSSHeader)));
 
-        if (fd >= 0)
-                close_nointr_nofail(fd);
-
+        safe_close(fd);
         free(p);
+
         return r;
 }