From: Yu Watanabe Date: Mon, 1 May 2023 05:16:43 +0000 (+0900) Subject: sd-journal: tighten variable scope X-Git-Tag: v254-rc1~586^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e758735d330044402826ac2e8c2a0814b02fec92;p=thirdparty%2Fsystemd.git sd-journal: tighten variable scope --- diff --git a/src/libsystemd/sd-journal/journal-file.c b/src/libsystemd/sd-journal/journal-file.c index c59d2b07c66..1413f7014f1 100644 --- a/src/libsystemd/sd-journal/journal-file.c +++ b/src/libsystemd/sd-journal/journal-file.c @@ -2629,7 +2629,7 @@ static int generic_array_get( Object **ret_object, uint64_t *ret_offset) { - uint64_t p = 0, a, t = 0, k; + uint64_t a, t = 0, k; ChainCacheItem *ci; Object *o; int r; @@ -2699,6 +2699,8 @@ static int generic_array_get( } do { + uint64_t p; + p = journal_file_entry_array_item(f, o, i); r = journal_file_move_to_object(f, OBJECT_ENTRY, p, ret_object);