summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-05 18:01:55 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-05 18:15:05 +0200
commitcf2c04eb1356024ed5b63dbc3ff3c2d22bf6cdb1 (patch)
tree3b61c59964125ff0c5af37852dea1fa1e1c9e06e /Kernel
parent6dddd500bf97501887073b2cfab5d74ba1c59a51 (diff)
downloadserenity-cf2c04eb1356024ed5b63dbc3ff3c2d22bf6cdb1.zip
Kernel: Use TRY() in sys$dbgputstr()
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Syscalls/debug.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/Kernel/Syscalls/debug.cpp b/Kernel/Syscalls/debug.cpp
index 8156486589..f5d65de3cd 100644
--- a/Kernel/Syscalls/debug.cpp
+++ b/Kernel/Syscalls/debug.cpp
@@ -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();
}