diff --git a/Kernel/Syscalls/hostname.cpp b/Kernel/Syscalls/hostname.cpp index 1d841890877..da30c4d2bcb 100644 --- a/Kernel/Syscalls/hostname.cpp +++ b/Kernel/Syscalls/hostname.cpp @@ -32,11 +32,10 @@ ErrorOr Process::sys$sethostname(Userspace buffer, size_t if (length > 64) return ENAMETOOLONG; auto new_name = TRY(try_copy_kstring_from_user(buffer, length)); - return hostname().with_exclusive([&](auto& name) -> ErrorOr { - // FIXME: Use KString instead of String here. + hostname().with_exclusive([&](auto& name) { name = new_name->view(); - return 0; }); + return 0; } }