zdump: dfo_elf: notes_init: use PTR_DIFF

Use `PTR_DIFF` since this is exactly what is done here.

Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2021-10-04 13:38:18 +00:00
committed by Jan Höppner
parent 5160f41079
commit ee89b850fe

View File

@@ -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;
}