net/local: Fix the error return length when read the bigger packet.

Verifiction:
  Write a bigger packet and read the packet using a smaller buffer.
  The return length of reading should be the length of smaller buffer.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
This commit is contained in:
liqinhui 2023-08-07 16:21:45 +08:00 committed by Xiang Xiao
parent 8631e0c6b5
commit 2d0df3b5f2

View File

@ -398,7 +398,6 @@ psock_dgram_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len,
DEBUGASSERT(tmplen <= remaining);
remaining -= tmplen;
readlen += tmplen;
}
while (remaining > 0);
}