mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +00:00
Kernel: Use static_ptr_cast to convert between Userspace<T*> types
Some calls of copy_to_user were converting Userspace<T*> to Userspace<U*> via the implicit conversion to FlatPtr. Change them to use the static_ptr_cast overload that is designed to express this conversion
This commit is contained in:
parent
194456efdc
commit
7243bcb7da
4 changed files with 5 additions and 5 deletions
|
@ -763,7 +763,7 @@ ErrorOr<void> IPv4Socket::ioctl(OpenFileDescription&, unsigned request, Userspac
|
|||
|
||||
case FIONREAD: {
|
||||
int readable = m_receive_buffer->immediately_readable();
|
||||
return copy_to_user(Userspace<int*>(arg), &readable);
|
||||
return copy_to_user(static_ptr_cast<int*>(arg), &readable);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue