]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-journal: tighten variable scope
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 Apr 2023 11:40:08 +0000 (20:40 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 26 Apr 2023 11:50:53 +0000 (20:50 +0900)
src/libsystemd/sd-journal/journal-file.c

index bafd2bae80d2e0d08cce558ca898fb19ed13903e..f14e7aa23d2d9edd2132894ba7c46779dd38c137 100644 (file)
@@ -4168,7 +4168,7 @@ int journal_file_copy_entry(
 
         _cleanup_free_ EntryItem *items_alloc = NULL;
         EntryItem *items;
-        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;
         int r;
@@ -4200,7 +4200,7 @@ int journal_file_copy_entry(
         }
 
         for (uint64_t i = 0; i < n; i++) {
-                uint64_t h;
+                uint64_t h, q;
                 void *data;
                 size_t l;
                 Object *u;