mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
Kernel: Move sys$uname to use TypedTransfer
This should equate to roughly the same code but improve typechecking.
This commit is contained in:
parent
7c05eed487
commit
7e11b9a276
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ ErrorOr<FlatPtr> Process::sys$uname(Userspace<utsname*> user_buf)
|
|||
|
||||
hostname().with_shared([&](auto const& name) {
|
||||
auto length = min(name->length(), UTSNAME_ENTRY_LEN - 1);
|
||||
memcpy(buf.nodename, name->characters(), length);
|
||||
AK::TypedTransfer<char>::copy(reinterpret_cast<char*>(buf.nodename), name->characters(), length);
|
||||
buf.nodename[length] = '\0';
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue