mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:47:45 +00:00
AK: Use Error::from_errno in adopt_nonnull_own_or_enomem
This fails to build on Lagom otherwise.
This commit is contained in:
parent
1e773256bf
commit
9569841589
1 changed files with 1 additions and 1 deletions
|
@ -210,7 +210,7 @@ inline ErrorOr<NonnullOwnPtr<T>> adopt_nonnull_own_or_enomem(T* object)
|
|||
{
|
||||
auto result = adopt_own_if_nonnull(object);
|
||||
if (!result)
|
||||
return ENOMEM;
|
||||
return Error::from_errno(ENOMEM);
|
||||
return result.release_nonnull();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue