From 6e42053a1234c4c6e857569e36955ed0b0f27147 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Wed, 26 Apr 2023 20:40:08 +0900 Subject: [PATCH] sd-journal: tighten variable scope (cherry picked from commit 265b1dc04845788973ef95e80fae8db258a8c49a) (cherry picked from commit 45b045880c5816b36fc496e519249f57d256136d) (cherry picked from commit 413405d856503f68afc5576644cd919485ade45e) Conflict:code context adaptation Reference:https://github.com/systemd/systemd-stable/commit/6e42053a1234c4c6e857569e36955ed0b0f27147 --- src/libsystemd/sd-journal/journal-file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsystemd/sd-journal/journal-file.c b/src/libsystemd/sd-journal/journal-file.c index 4510db6d3e..204debed64 100644 --- a/src/libsystemd/sd-journal/journal-file.c +++ b/src/libsystemd/sd-journal/journal-file.c @@ -3736,7 +3736,7 @@ int journal_file_dispose(int dir_fd, const char *fname) { } int journal_file_copy_entry(JournalFile *from, JournalFile *to, Object *o, uint64_t p) { - uint64_t q, n, m = 0, xor_hash = 0; + uint64_t n, m = 0, xor_hash = 0; const sd_id128_t *boot_id; dual_timestamp ts; EntryItem *items; @@ -3761,7 +3761,7 @@ int journal_file_copy_entry(JournalFile *from, JournalFile *to, Object *o, uint6 items = newa(EntryItem, MAX(1u, n)); for (uint64_t i = 0; i < n; i++) { - uint64_t l, h; + uint64_t l, h, q; le64_t le_hash; size_t t; void *data; -- 2.33.0