diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-06 20:26:03 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-06 20:26:03 +0200 |
commit | a2bf8244fe140e39006e0022d55027aaf95225de (patch) | |
tree | 04bdbcdd3e6826dc51bd3807b0a01024c0484bf4 /Kernel/Net/LocalSocket.cpp | |
parent | 704a2bfad5ba92725b3ed7b535753adc536666bd (diff) | |
download | serenity-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.cpp | 3 |
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); |