1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:07:46 +00:00

Kernel: Simplify WatchDescription::create()

This commit is contained in:
Andreas Kling 2021-09-05 21:40:01 +02:00
parent 5e2bae700d
commit 540d62d3b2

View file

@ -26,10 +26,7 @@ struct WatchDescription {
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));
if (description)
return description.release_nonnull();
return ENOMEM;
return adopt_nonnull_own_or_enomem(new (nothrow) WatchDescription(wd, inode, event_mask));
}
private: