Kernel: Don't return -EFOO when return type is KResultOr<...>

This commit is contained in:
Andreas Kling 2021-03-15 09:04:04 +01:00
commit a166a65eff
Notes: sideshowbarker 2024-07-18 21:20:33 +09:00
5 changed files with 7 additions and 6 deletions

View file

@ -254,7 +254,7 @@ KResultOr<size_t> Socket::read(FileDescription& description, size_t, UserOrKerne
KResultOr<size_t> Socket::write(FileDescription& description, size_t, const UserOrKernelBuffer& data, size_t size)
{
if (is_shut_down_for_writing())
return -EPIPE;
return EPIPE;
return sendto(description, data, size, 0, {}, 0);
}