summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/get_dir_entries.cpp
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-06-16 16:44:15 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-16 21:29:36 +0200
commitbc3076f8944e5a4f72b15e4e13c16b2c3e2f2080 (patch)
tree95219ba7fb9555dae2876041cc2e30a28556e057 /Kernel/Syscalls/get_dir_entries.cpp
parentca3cae81eb8e20d63e36e7359a776af5eb4d5ea2 (diff)
downloadserenity-bc3076f8944e5a4f72b15e4e13c16b2c3e2f2080.zip
Kernel: Remove various other uses of ssize_t
Diffstat (limited to 'Kernel/Syscalls/get_dir_entries.cpp')
-rw-r--r--Kernel/Syscalls/get_dir_entries.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Syscalls/get_dir_entries.cpp b/Kernel/Syscalls/get_dir_entries.cpp
index 8219cfdecc..b449e88dcd 100644
--- a/Kernel/Syscalls/get_dir_entries.cpp
+++ b/Kernel/Syscalls/get_dir_entries.cpp
@@ -9,10 +9,10 @@
namespace Kernel {
-KResultOr<ssize_t> Process::sys$get_dir_entries(int fd, Userspace<void*> user_buffer, ssize_t user_size)
+KResultOr<size_t> Process::sys$get_dir_entries(int fd, Userspace<void*> user_buffer, size_t user_size)
{
REQUIRE_PROMISE(stdio);
- if (user_size < 0)
+ if (user_size > NumericLimits<ssize_t>::max())
return EINVAL;
auto description = file_description(fd);
if (!description)