summaryrefslogtreecommitdiff
path: root/Kernel/Net/LocalSocket.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-06 20:26:03 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-06 20:26:03 +0200
commita2bf8244fe140e39006e0022d55027aaf95225de (patch)
tree04bdbcdd3e6826dc51bd3807b0a01024c0484bf4 /Kernel/Net/LocalSocket.cpp
parent704a2bfad5ba92725b3ed7b535753adc536666bd (diff)
downloadserenity-a2bf8244fe140e39006e0022d55027aaf95225de.zip
Kernel: Use TRY() once more in LocalSocket::try_create_connected_pair()
Diffstat (limited to 'Kernel/Net/LocalSocket.cpp')
-rw-r--r--Kernel/Net/LocalSocket.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/Net/LocalSocket.cpp b/Kernel/Net/LocalSocket.cpp
index 8b03d388f6..489ce80b6b 100644
--- a/Kernel/Net/LocalSocket.cpp
+++ b/Kernel/Net/LocalSocket.cpp
@@ -53,8 +53,7 @@ KResultOr<SocketPair> LocalSocket::try_create_connected_pair(int type)
auto socket = TRY(LocalSocket::try_create(type));
auto description1 = TRY(FileDescription::try_create(*socket));
- if (auto result = socket->try_set_path("[socketpair]"sv); result.is_error())
- return result;
+ TRY(socket->try_set_path("[socketpair]"sv));
socket->set_acceptor(Process::current());
socket->set_connected(true);