mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 13:35:03 +00:00
Kernel: Use KResult a bit more in the IPv4 networking code
This commit is contained in:
@@ -225,9 +225,9 @@ KResultOr<size_t> IPv4Socket::sendto(FileDescription&, const UserOrKernelBuffer&
|
||||
#endif
|
||||
|
||||
if (type() == SOCK_RAW) {
|
||||
int err = routing_decision.adapter->send_ipv4(routing_decision.next_hop, m_peer_address, (IPv4Protocol)protocol(), data, data_length, m_ttl);
|
||||
if (err < 0)
|
||||
return KResult((ErrnoCode)-err);
|
||||
auto result = routing_decision.adapter->send_ipv4(routing_decision.next_hop, m_peer_address, (IPv4Protocol)protocol(), data, data_length, m_ttl);
|
||||
if (result.is_error())
|
||||
return result;
|
||||
return data_length;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user