summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorsin-ack <sin-ack@users.noreply.github.com>2021-12-29 22:29:12 +0000
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2022-01-13 15:16:12 +0330
commit9569841589b13a4512ba32589219bac76925aa20 (patch)
tree5dd3767bcbe3bb7e847de940d6f13dc104e0a996 /AK
parent1e773256bf321201f36fe39035dadeb48e3a62c4 (diff)
downloadserenity-9569841589b13a4512ba32589219bac76925aa20.zip
AK: Use Error::from_errno in adopt_nonnull_own_or_enomem
This fails to build on Lagom otherwise.
Diffstat (limited to 'AK')
-rw-r--r--AK/OwnPtr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/OwnPtr.h b/AK/OwnPtr.h
index fe1494bf8d..4210bdf853 100644
--- a/AK/OwnPtr.h
+++ b/AK/OwnPtr.h
@@ -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();
}