Kernel: cast between inheritance with static_cast

using reinterpret_cast is not a good idea. preferably we would use
dynamic_cast, but that is not possible since kernel is compiled with
-fno-rtti.
This commit is contained in:
2023-11-29 20:50:57 +02:00
parent 327b330338
commit fdb6dc94ba
4 changed files with 12 additions and 12 deletions

View File

@@ -41,7 +41,7 @@ namespace Kernel
auto inode = inode_or_error.release_value();
if (inode->mode().iflnk())
MUST(reinterpret_cast<TmpSymlinkInode*>(inode.ptr())->set_link_target(name()));
MUST(static_cast<TmpSymlinkInode&>(*inode.ptr()).set_link_target(name()));
}
BAN::ErrorOr<void> TTY::tty_ctrl(int command, int flags)