Kernel: Use TRY() in sys$dbgputstr()
This commit is contained in:
parent
6dddd500bf
commit
cf2c04eb13
Notes:
sideshowbarker
2024-07-18 04:41:18 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/cf2c04eb135
1 changed files with 1 additions and 4 deletions
|
@ -38,10 +38,7 @@ KResultOr<FlatPtr> Process::sys$dbgputstr(Userspace<const char*> characters, siz
|
|||
return size;
|
||||
}
|
||||
|
||||
auto result = try_copy_kstring_from_user(characters, size);
|
||||
if (result.is_error())
|
||||
return result.error();
|
||||
auto string = result.release_value();
|
||||
auto string = TRY(try_copy_kstring_from_user(characters, size));
|
||||
dbgputstr(string->view());
|
||||
return string->length();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue