mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
Kernel: Use TRY() in sys$unlink()
This commit is contained in:
parent
4e4b7c272c
commit
de2c1bc5c3
Notes:
sideshowbarker
2024-07-18 04:41:34 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/de2c1bc5c31
@ -14,10 +14,8 @@ KResultOr<FlatPtr> Process::sys$unlink(Userspace<const char*> user_path, size_t
|
||||
{
|
||||
VERIFY_PROCESS_BIG_LOCK_ACQUIRED(this)
|
||||
REQUIRE_PROMISE(cpath);
|
||||
auto path = get_syscall_path_argument(user_path, path_length);
|
||||
if (path.is_error())
|
||||
return path.error();
|
||||
return VirtualFileSystem::the().unlink(path.value()->view(), current_directory());
|
||||
auto path = TRY(get_syscall_path_argument(user_path, path_length));
|
||||
return VirtualFileSystem::the().unlink(path->view(), current_directory());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user