diff options
author | Brian Gianforcaro <b.gianfo@gmail.com> | 2020-08-09 12:42:51 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-10 12:52:15 +0200 |
commit | b4d04fd8d1083e364d638df97941d52cb5c5c481 (patch) | |
tree | db4b8ca632a7bc0921af0e97c94840c0f161880e /Kernel/Syscalls | |
parent | 48d9f3c2e6a77f9596a4dbc5d19eb7d5d1976b00 (diff) | |
download | serenity-b4d04fd8d1083e364d638df97941d52cb5c5c481.zip |
Kernel: Use Userspace<T> for the clock_gettime syscall
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r-- | Kernel/Syscalls/clock.cpp | 5 |
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: |