chiark / gitweb /
util: replace close_nointr_nofail() by a more useful safe_close()
[elogind.git] / src / journal / journal-authenticate.c
index bd7100a..5ab1982 100644 (file)
@@ -60,7 +60,7 @@ int journal_file_append_tag(JournalFile *f) {
         o->tag.seqnum = htole64(journal_file_tag_seqnum(f));
         o->tag.epoch = htole64(FSPRG_GetEpoch(f->fsprg_state));
 
-        log_debug("Writing tag %"PRIu64" for epoch %"PRIu64"\n",
+        log_debug("Writing tag %"PRIu64" for epoch %"PRIu64"",
                   le64toh(o->tag.seqnum),
                   FSPRG_GetEpoch(f->fsprg_state));
 
@@ -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;
 }