summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/FileDescription.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-04-23 16:46:57 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-23 16:46:57 +0200
commitb91c49364df1683c7fe1191eb02b8d9c331874f6 (patch)
treea9ea5ff8e4cc8cfcfe75c279551be35793d0ffb3 /Kernel/FileSystem/FileDescription.cpp
parentb3db01e20eeae632cc75df9af8666772bda67091 (diff)
downloadserenity-b91c49364df1683c7fe1191eb02b8d9c331874f6.zip
AK: Rename adopt() to adopt_ref()
This makes it more symmetrical with adopt_own() (which is used to create a NonnullOwnPtr from the result of a naked new.)
Diffstat (limited to 'Kernel/FileSystem/FileDescription.cpp')
-rw-r--r--Kernel/FileSystem/FileDescription.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/FileSystem/FileDescription.cpp b/Kernel/FileSystem/FileDescription.cpp
index bfc3db6fd3..70a6be8ead 100644
--- a/Kernel/FileSystem/FileDescription.cpp
+++ b/Kernel/FileSystem/FileDescription.cpp
@@ -25,7 +25,7 @@ namespace Kernel {
KResultOr<NonnullRefPtr<FileDescription>> FileDescription::create(Custody& custody)
{
- auto description = adopt(*new FileDescription(InodeFile::create(custody.inode())));
+ auto description = adopt_ref(*new FileDescription(InodeFile::create(custody.inode())));
description->m_custody = custody;
auto result = description->attach();
if (result.is_error()) {
@@ -37,7 +37,7 @@ KResultOr<NonnullRefPtr<FileDescription>> FileDescription::create(Custody& custo
KResultOr<NonnullRefPtr<FileDescription>> FileDescription::create(File& file)
{
- auto description = adopt(*new FileDescription(file));
+ auto description = adopt_ref(*new FileDescription(file));
auto result = description->attach();
if (result.is_error()) {
dbgln_if(FILEDESCRIPTION_DEBUG, "Failed to create file description for file: {}", result);