summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls
diff options
context:
space:
mode:
authorBrian Gianforcaro <b.gianfo@gmail.com>2020-08-09 12:42:51 -0700
committerAndreas Kling <kling@serenityos.org>2020-08-10 12:52:15 +0200
commitb4d04fd8d1083e364d638df97941d52cb5c5c481 (patch)
treedb4b8ca632a7bc0921af0e97c94840c0f161880e /Kernel/Syscalls
parent48d9f3c2e6a77f9596a4dbc5d19eb7d5d1976b00 (diff)
downloadserenity-b4d04fd8d1083e364d638df97941d52cb5c5c481.zip
Kernel: Use Userspace<T> for the clock_gettime syscall
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r--Kernel/Syscalls/clock.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Kernel/Syscalls/clock.cpp b/Kernel/Syscalls/clock.cpp
index dc9a6e4c6e..3bac104a2c 100644
--- a/Kernel/Syscalls/clock.cpp
+++ b/Kernel/Syscalls/clock.cpp
@@ -29,14 +29,13 @@
namespace Kernel {
-int Process::sys$clock_gettime(clockid_t clock_id, timespec* user_ts)
+int Process::sys$clock_gettime(clockid_t clock_id, Userspace<timespec*> user_ts)
{
REQUIRE_PROMISE(stdio);
if (!validate_write_typed(user_ts))
return -EFAULT;
- timespec ts;
- memset(&ts, 0, sizeof(ts));
+ timespec ts = {};
switch (clock_id) {
case CLOCK_MONOTONIC: