소스 검색

Kernel: Simplify Process::get_syscall_path_argument()

Andreas Kling 3 년 전
부모
커밋
2ab8fd89fc
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      Kernel/Process.cpp

+ 1 - 4
Kernel/Process.cpp

@@ -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