mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
Kernel: Use TRY() once more in LocalSocket::try_create_connected_pair()
This commit is contained in:
parent
704a2bfad5
commit
a2bf8244fe
1 changed files with 1 additions and 2 deletions
|
@ -53,8 +53,7 @@ KResultOr<SocketPair> LocalSocket::try_create_connected_pair(int type)
|
||||||
auto socket = TRY(LocalSocket::try_create(type));
|
auto socket = TRY(LocalSocket::try_create(type));
|
||||||
auto description1 = TRY(FileDescription::try_create(*socket));
|
auto description1 = TRY(FileDescription::try_create(*socket));
|
||||||
|
|
||||||
if (auto result = socket->try_set_path("[socketpair]"sv); result.is_error())
|
TRY(socket->try_set_path("[socketpair]"sv));
|
||||||
return result;
|
|
||||||
|
|
||||||
socket->set_acceptor(Process::current());
|
socket->set_acceptor(Process::current());
|
||||||
socket->set_connected(true);
|
socket->set_connected(true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue