AK: Use Error::from_errno in adopt_nonnull_own_or_enomem

This fails to build on Lagom otherwise.
This commit is contained in:
sin-ack 2021-12-29 22:29:12 +00:00 committed by Ali Mohammad Pur
parent 1e773256bf
commit 9569841589
Notes: sideshowbarker 2024-07-17 20:58:11 +09:00

View file

@ -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();
}