summaryrefslogtreecommitdiffstats
path: root/src/interface/efi/efi_umalloc.c
diff options
context:
space:
mode:
authorMichael Brown2025-04-20 19:29:48 +0200
committerMichael Brown2025-04-21 00:00:13 +0200
commit89fe7886897be76ed902317e311d60ae654057aa (patch)
treeeddd42226c8336226d0a9649d705ccc9f02c88f4 /src/interface/efi/efi_umalloc.c
parent[uaccess] Remove redundant userptr_add() and userptr_diff() (diff)
downloadipxe-89fe7886897be76ed902317e311d60ae654057aa.tar.gz
ipxe-89fe7886897be76ed902317e311d60ae654057aa.tar.xz
ipxe-89fe7886897be76ed902317e311d60ae654057aa.zip
[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>
Diffstat (limited to 'src/interface/efi/efi_umalloc.c')
-rw-r--r--src/interface/efi/efi_umalloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interface/efi/efi_umalloc.c b/src/interface/efi/efi_umalloc.c
index 175ae367e..488c53f3d 100644
--- a/src/interface/efi/efi_umalloc.c
+++ b/src/interface/efi/efi_umalloc.c
@@ -87,8 +87,8 @@ static userptr_t efi_urealloc ( userptr_t old_ptr, size_t new_size ) {
if ( old_ptr && ( old_ptr != UNOWHERE ) ) {
copy_from_user ( &old_size, old_ptr, -EFI_PAGE_SIZE,
sizeof ( old_size ) );
- memcpy_user ( new_ptr, 0, old_ptr, 0,
- ( (old_size < new_size) ? old_size : new_size ));
+ memcpy ( new_ptr, old_ptr,
+ ( (old_size < new_size) ? old_size : new_size ) );
old_pages = ( EFI_SIZE_TO_PAGES ( old_size ) + 1 );
phys_addr = user_to_phys ( old_ptr, -EFI_PAGE_SIZE );
if ( ( efirc = bs->FreePages ( phys_addr, old_pages ) ) != 0 ){