mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
Kernel: Simplify sys$inode_watcher_remove_watch() a little bit
This commit is contained in:
parent
d912bfdf38
commit
c076d765c4
1 changed files with 1 additions and 7 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue