summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r--Kernel/Syscalls/open.cpp4
-rw-r--r--Kernel/Syscalls/stat.cpp4
-rw-r--r--Kernel/Syscalls/unveil.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/Kernel/Syscalls/open.cpp b/Kernel/Syscalls/open.cpp
index 209396ca97..77f2039669 100644
--- a/Kernel/Syscalls/open.cpp
+++ b/Kernel/Syscalls/open.cpp
@@ -84,9 +84,9 @@ KResultOr<FlatPtr> Process::sys$close(int fd)
dbgln_if(IO_DEBUG, "sys$close({}) {}", fd, description.ptr());
if (!description)
return EBADF;
- int rc = description->close();
+ auto result = description->close();
m_fds[fd] = {};
- return rc;
+ return result;
}
}
diff --git a/Kernel/Syscalls/stat.cpp b/Kernel/Syscalls/stat.cpp
index 7d42d49a2b..ac31ec9ce0 100644
--- a/Kernel/Syscalls/stat.cpp
+++ b/Kernel/Syscalls/stat.cpp
@@ -19,10 +19,10 @@ KResultOr<FlatPtr> Process::sys$fstat(int fd, Userspace<stat*> user_statbuf)
if (!description)
return EBADF;
stat buffer = {};
- int rc = description->stat(buffer);
+ auto result = description->stat(buffer);
if (!copy_to_user(user_statbuf, &buffer))
return EFAULT;
- return rc;
+ return result;
}
KResultOr<FlatPtr> Process::sys$stat(Userspace<const Syscall::SC_stat_params*> user_params)
diff --git a/Kernel/Syscalls/unveil.cpp b/Kernel/Syscalls/unveil.cpp
index 7c7bfb7b95..710011a8e4 100644
--- a/Kernel/Syscalls/unveil.cpp
+++ b/Kernel/Syscalls/unveil.cpp
@@ -97,7 +97,7 @@ KResultOr<FlatPtr> Process::sys$unveil(Userspace<const Syscall::SC_unveil_params
new_unveiled_path = custody_or_error.value()->try_create_absolute_path();
if (!new_unveiled_path)
return ENOMEM;
- } else if (custody_or_error.error() == -ENOENT && parent_custody && (new_permissions & UnveilAccess::CreateOrRemove)) {
+ } else if (custody_or_error.error() == ENOENT && parent_custody && (new_permissions & UnveilAccess::CreateOrRemove)) {
auto parent_custody_path = parent_custody->try_create_absolute_path();
if (!parent_custody_path)
return ENOMEM;