From: Vito Caputo Date: Tue, 25 Aug 2020 18:56:27 +0000 (-0700) Subject: sd-journal: narrow scope of boot id variable X-Git-Tag: v247-rc1~364 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4739bc4d3066d589db53f6ad8bd18ef4c08a3c8;p=thirdparty%2Fsystemd.git sd-journal: narrow scope of boot id variable Something trivial I noticed during some unrelated code spelunking --- diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 6fb0abb419d..2023cc0c010 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -2219,7 +2219,6 @@ _public_ int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret, sd_id12 Object *o; JournalFile *f; int r; - sd_id128_t id; assert_return(j, -EINVAL); assert_return(!journal_pid_changed(j), -ECHILD); @@ -2238,6 +2237,8 @@ _public_ int sd_journal_get_monotonic_usec(sd_journal *j, uint64_t *ret, sd_id12 if (ret_boot_id) *ret_boot_id = o->entry.boot_id; else { + sd_id128_t id; + r = sd_id128_get_boot(&id); if (r < 0) return r;