diff --git a/net/local/local_recvfrom.c b/net/local/local_recvfrom.c index 1d3e5791c8..3ceac8bd1a 100644 --- a/net/local/local_recvfrom.c +++ b/net/local/local_recvfrom.c @@ -337,7 +337,7 @@ psock_dgram_recvfrom(FAR struct socket *psock, FAR void *buf, size_t len, /* Adjust the number of bytes remaining to be read from the packet */ - DEBUGASSERT(tmplen <= remain); + DEBUGASSERT(tmplen <= remaining); remaining -= tmplen; } while (remaining > 0); diff --git a/net/local/local_recvutils.c b/net/local/local_recvutils.c index 7457268ecf..f6e638ab01 100644 --- a/net/local/local_recvutils.c +++ b/net/local/local_recvutils.c @@ -111,7 +111,7 @@ int local_fifo_read(int fd, FAR uint8_t *buf, size_t *len) } else { - DEBUGASSERT(nread <= len); + DEBUGASSERT(nread <= remaining); remaining -= nread; buf += nread; }