summaryrefslogtreecommitdiff
path: root/Kernel/Net/LocalSocket.cpp
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-12-30 13:43:45 +0100
committerAndreas Kling <kling@serenityos.org>2021-12-30 14:16:03 +0100
commit1d2f78682b83706207aaf8328681ae7c1e2ea793 (patch)
tree936ef2f3272bbbf96ed8e28219e2db034ea7cc85 /Kernel/Net/LocalSocket.cpp
parent726c023f9e2297c35614e595b221e97b2e5ec6a7 (diff)
downloadserenity-1d2f78682b83706207aaf8328681ae7c1e2ea793.zip
Kernel+AK: Eliminate a couple of temporary String allocations
Diffstat (limited to 'Kernel/Net/LocalSocket.cpp')
-rw-r--r--Kernel/Net/LocalSocket.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Net/LocalSocket.cpp b/Kernel/Net/LocalSocket.cpp
index 73205c85c2..d07c15ca27 100644
--- a/Kernel/Net/LocalSocket.cpp
+++ b/Kernel/Net/LocalSocket.cpp
@@ -378,7 +378,7 @@ ErrorOr<NonnullOwnPtr<KString>> LocalSocket::pseudo_path(const OpenFileDescripti
break;
}
- return KString::try_create(builder.to_string());
+ return KString::try_create(builder.string_view());
}
ErrorOr<void> LocalSocket::getsockopt(OpenFileDescription& description, int level, int option, Userspace<void*> value, Userspace<socklen_t*> value_size)