From 07b3837e6847749b35380e5b9b4118b28710d556 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Mon, 8 Nov 2021 17:42:13 +0100 Subject: [PATCH] zdump: dump_chunks_init: replace 0 with `off` variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...to make clear why `off` is initialized to 0 and that all calls to `dfo_chunk_add` occur for the same reason. For consistency reasons adapt the `off` value calculation as well. Reviewed-by: Alexander Egorenkov Signed-off-by: Marc Hartmayer Signed-off-by: Jan Höppner --- zdump/dfo_elf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zdump/dfo_elf.c b/zdump/dfo_elf.c index 040410ca..f09b721f 100644 --- a/zdump/dfo_elf.c +++ b/zdump/dfo_elf.c @@ -283,8 +283,8 @@ static void dump_chunks_init(void) struct dfi_mem_chunk *mem_chunk; u64 off = 0; - dfo_chunk_add(0, l.hdr_size, l.hdr, dfo_chunk_buf_fn); - off = l.hdr_size; + dfo_chunk_add(off, l.hdr_size, l.hdr, dfo_chunk_buf_fn); + off += l.hdr_size; dfi_mem_chunk_iterate(mem_chunk) { if (mem_chunk->read_fn == dfi_mem_chunk_read_zero) /* Zero memory chunk */