]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal-file: simplify boot ID acquiring
authorLennart Poettering <lennart@poettering.net>
Fri, 29 May 2020 22:32:31 +0000 (00:32 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 25 Jun 2020 13:01:12 +0000 (15:01 +0200)
src/journal/journal-file.c

index b1e092224f789cfa227c7fdc1d3f1f10a44ebaf3..f6b7c660945a860c24875c426adef3fcc8e512e1 100644 (file)
@@ -445,7 +445,6 @@ static int journal_file_init_header(JournalFile *f, JournalFile *template) {
 }
 
 static int journal_file_refresh_header(JournalFile *f) {
-        sd_id128_t boot_id;
         int r;
 
         assert(f);
@@ -458,12 +457,10 @@ static int journal_file_refresh_header(JournalFile *f) {
         else if (r < 0)
                 return r;
 
-        r = sd_id128_get_boot(&boot_id);
+        r = sd_id128_get_boot(&f->header->boot_id);
         if (r < 0)
                 return r;
 
-        f->header->boot_id = boot_id;
-
         r = journal_file_set_online(f);
 
         /* Sync the online state to disk */