mirror of
https://github.com/ipxe/ipxe
synced 2026-04-16 03:00:10 +03:00
[uaccess] Remove redundant memcpy_user() and related string functions
The memcpy_user(), memmove_user(), memcmp_user(), memset_user(), and strlen_user() functions are now just straightforward wrappers around the corresponding standard library functions. Remove these redundant wrappers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
+1
-1
@@ -66,7 +66,7 @@ static int elf_load_segment ( struct image *image, Elf_Phdr *phdr,
|
||||
}
|
||||
|
||||
/* Copy image to segment */
|
||||
memcpy_user ( buffer, 0, image->data, phdr->p_offset, phdr->p_filesz );
|
||||
memcpy ( buffer, ( image->data + phdr->p_offset ), phdr->p_filesz );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ int prep_segment ( userptr_t segment, size_t filesz, size_t memsz ) {
|
||||
if ( ( start >= memmap.regions[i].start ) &&
|
||||
( end <= memmap.regions[i].end ) ) {
|
||||
/* Found valid region: zero bss and return */
|
||||
memset_user ( segment, filesz, 0, ( memsz - filesz ) );
|
||||
memset ( ( segment + filesz ), 0, ( memsz - filesz ) );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user