mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 01:37:39 +03:00
Kernel: Simplify Process::get_syscall_path_argument()
This commit is contained in:
parent
f30eae7e7a
commit
2ab8fd89fc
Notes:
sideshowbarker
2024-07-18 04:43:43 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/2ab8fd89fc6
@ -544,10 +544,7 @@ KResultOr<NonnullOwnPtr<KString>> Process::get_syscall_path_argument(Userspace<c
|
||||
return EINVAL;
|
||||
if (path_length > PATH_MAX)
|
||||
return ENAMETOOLONG;
|
||||
auto string_or_error = try_copy_kstring_from_user(user_path, path_length);
|
||||
if (string_or_error.is_error())
|
||||
return string_or_error.error();
|
||||
return string_or_error.release_value();
|
||||
return try_copy_kstring_from_user(user_path, path_length);
|
||||
}
|
||||
|
||||
KResultOr<NonnullOwnPtr<KString>> Process::get_syscall_path_argument(Syscall::StringArgument const& path) const
|
||||
|
Loading…
Reference in New Issue
Block a user