From ee89b850fe2eb2f4c086a99fd171fce66352bde2 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Mon, 4 Oct 2021 13:38:18 +0000 Subject: [PATCH] zdump: dfo_elf: notes_init: use `PTR_DIFF` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use `PTR_DIFF` since this is exactly what is done here. Reviewed-by: Alexander Egorenkov Signed-off-by: Marc Hartmayer Signed-off-by: Jan Höppner --- zdump/dfo_elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zdump/dfo_elf.c b/zdump/dfo_elf.c index 3fe0570e..93f7c4b6 100644 --- a/zdump/dfo_elf.c +++ b/zdump/dfo_elf.c @@ -270,7 +270,7 @@ out: memset(phdr, 0, sizeof(*phdr)); phdr->p_type = PT_NOTE; phdr->p_offset = notes_offset; - phdr->p_filesz = (unsigned long) PTR_SUB(ptr, ptr_start); + phdr->p_filesz = PTR_DIFF(ptr, ptr_start); return ptr; }