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
Notes:
sideshowbarker
2024-07-17 20:58:11 +09:00
Author: https://github.com/sin-ack Commit: https://github.com/SerenityOS/serenity/commit/9569841589b Pull-request: https://github.com/SerenityOS/serenity/pull/11292 Reviewed-by: https://github.com/creator1creeper1 ✅
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
Reference in a new issue