mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
Kernel: Simplify sys$inode_watcher_remove_watch() a little bit
This commit is contained in:
parent
d912bfdf38
commit
c076d765c4
Notes:
sideshowbarker
2024-07-18 04:40:39 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c076d765c43
@ -58,13 +58,7 @@ KResultOr<FlatPtr> Process::sys$inode_watcher_remove_watch(int fd, int wd)
|
||||
auto description = TRY(fds().file_description(fd));
|
||||
if (!description->is_inode_watcher())
|
||||
return EBADF;
|
||||
auto inode_watcher = description->inode_watcher();
|
||||
|
||||
auto result = inode_watcher->unregister_by_wd(wd);
|
||||
if (result.is_error())
|
||||
return result;
|
||||
|
||||
return 0;
|
||||
return description->inode_watcher()->unregister_by_wd(wd);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user