mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:17:45 +00:00
Kernel: Simplify WatchDescription::create()
This commit is contained in:
parent
5e2bae700d
commit
540d62d3b2
1 changed files with 1 additions and 4 deletions
|
@ -26,10 +26,7 @@ struct WatchDescription {
|
||||||
|
|
||||||
static KResultOr<NonnullOwnPtr<WatchDescription>> create(int wd, Inode& inode, unsigned event_mask)
|
static KResultOr<NonnullOwnPtr<WatchDescription>> create(int wd, Inode& inode, unsigned event_mask)
|
||||||
{
|
{
|
||||||
auto description = adopt_own_if_nonnull(new (nothrow) WatchDescription(wd, inode, event_mask));
|
return adopt_nonnull_own_or_enomem(new (nothrow) WatchDescription(wd, inode, event_mask));
|
||||||
if (description)
|
|
||||||
return description.release_nonnull();
|
|
||||||
return ENOMEM;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue