]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: fix variable initialization
authorLennart Poettering <lennart@poettering.net>
Thu, 16 Aug 2012 15:39:00 +0000 (17:39 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 16 Aug 2012 15:39:00 +0000 (17:39 +0200)
src/journal/journal-verify.c

index ad96cca4778ac20bb3c560332b2a87ef3e306560..55ca52a64138c15f4b5c73c70db11f5a4b49d9ad 100644 (file)
@@ -610,6 +610,7 @@ int journal_file_verify(JournalFile *f, const char *key) {
         data_fd = mkostemp(data_path, O_CLOEXEC);
         if (data_fd < 0) {
                 log_error("Failed to create data file: %m");
+                r = -errno;
                 goto fail;
         }
         unlink(data_path);
@@ -617,6 +618,7 @@ int journal_file_verify(JournalFile *f, const char *key) {
         entry_fd = mkostemp(entry_path, O_CLOEXEC);
         if (entry_fd < 0) {
                 log_error("Failed to create entry file: %m");
+                r = -errno;
                 goto fail;
         }
         unlink(entry_path);
@@ -624,6 +626,7 @@ int journal_file_verify(JournalFile *f, const char *key) {
         entry_array_fd = mkostemp(entry_array_path, O_CLOEXEC);
         if (entry_array_fd < 0) {
                 log_error("Failed to create entry array file: %m");
+                r = -errno;
                 goto fail;
         }
         unlink(entry_array_path);