mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdump: don't modify passed program header in pt_load_add()
There should be no problem with this change since the changed value was never used. Therefore, let's remove the assignment and declare the parameter as const to prevent such a behavior in the future. Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
776e5d41d7
commit
229cd6d194
@@ -40,7 +40,7 @@ static void dfi_elf_mem_chunk_read_fn(struct dfi_mem_chunk *mem_chunk, u64 off,
|
||||
/*
|
||||
* Add load (memory chunk) to DFI dump
|
||||
*/
|
||||
static int pt_load_add(Elf64_Phdr *phdr)
|
||||
static int pt_load_add(const Elf64_Phdr *phdr)
|
||||
{
|
||||
u64 *off_ptr;
|
||||
|
||||
@@ -50,7 +50,6 @@ static int pt_load_add(Elf64_Phdr *phdr)
|
||||
phdr->p_filesz, phdr->p_memsz);
|
||||
|
||||
if (phdr->p_paddr != phdr->p_vaddr) {
|
||||
phdr->p_paddr = phdr->p_vaddr;
|
||||
STDERR("Dump file \"%s\" is a user space core dump\n",
|
||||
g.opts.device);
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user