From a2bf8244fe140e39006e0022d55027aaf95225de Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 6 Sep 2021 20:26:03 +0200 Subject: [PATCH] Kernel: Use TRY() once more in LocalSocket::try_create_connected_pair() --- Kernel/Net/LocalSocket.cpp | 3 +-- 1 file changed, 1 insertion(+), 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 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);