mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-28 18:44:24 +00:00
Kernel: Use KResult a bit more in the IPv4 networking code
This commit is contained in:
@@ -107,7 +107,9 @@ KResultOr<size_t> UDPSocket::protocol_send(const UserOrKernelBuffer& data, size_
|
||||
if (!data.read(udp_packet.payload(), data_length))
|
||||
return EFAULT;
|
||||
|
||||
routing_decision.adapter->send_ipv4(routing_decision.next_hop, peer_address(), IPv4Protocol::UDP, UserOrKernelBuffer::for_kernel_buffer(buffer), buffer_size, ttl());
|
||||
auto result = routing_decision.adapter->send_ipv4(routing_decision.next_hop, peer_address(), IPv4Protocol::UDP, UserOrKernelBuffer::for_kernel_buffer(buffer), buffer_size, ttl());
|
||||
if (result.is_error())
|
||||
return result;
|
||||
return data_length;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user