diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2021-12-22 13:20:32 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-12-23 23:08:10 +0100 |
commit | 8e3d1a42e3177096a1e7b84387c9f30627d3124e (patch) | |
tree | 2a4c55b2875a2938b6c37d6baedb30fdbbb9e3dd /Userland/Libraries/LibC/sys/mman.cpp | |
parent | d1ef8e63f75b18a744ba65105a0e7e0aac56e6c2 (diff) | |
download | serenity-8e3d1a42e3177096a1e7b84387c9f30627d3124e.zip |
Kernel+UE+LibC: Store address as void* in SC_m{re,}map_params
Most other syscalls pass address arguments as `void*` instead of
`uintptr_t`, so let's do that here too. Besides improving consistency,
this commit makes `strace` correctly pretty-print these arguments in
hex.
Diffstat (limited to 'Userland/Libraries/LibC/sys/mman.cpp')
-rw-r--r-- | Userland/Libraries/LibC/sys/mman.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibC/sys/mman.cpp b/Userland/Libraries/LibC/sys/mman.cpp index 7982da44b3..ff40f87e17 100644 --- a/Userland/Libraries/LibC/sys/mman.cpp +++ b/Userland/Libraries/LibC/sys/mman.cpp @@ -15,7 +15,7 @@ extern "C" { void* serenity_mmap(void* addr, size_t size, int prot, int flags, int fd, off_t offset, size_t alignment, const char* name) { - Syscall::SC_mmap_params params { (uintptr_t)addr, size, alignment, prot, flags, fd, offset, { name, name ? strlen(name) : 0 } }; + Syscall::SC_mmap_params params { addr, size, alignment, prot, flags, fd, offset, { name, name ? strlen(name) : 0 } }; ptrdiff_t rc = syscall(SC_mmap, ¶ms); if (rc < 0 && rc > -EMAXERRNO) { errno = -rc; @@ -37,7 +37,7 @@ void* mmap_with_name(void* addr, size_t size, int prot, int flags, int fd, off_t void* mremap(void* old_address, size_t old_size, size_t new_size, int flags) { - Syscall::SC_mremap_params params { (uintptr_t)old_address, old_size, new_size, flags }; + Syscall::SC_mremap_params params { old_address, old_size, new_size, flags }; ptrdiff_t rc = syscall(SC_mremap, ¶ms); if (rc < 0 && rc > -EMAXERRNO) { errno = -rc; |