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:
parent
8631e0c6b5
commit
2d0df3b5f2
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user