diff --git a/libs/libc/netdb/lib_dnsquery.c b/libs/libc/netdb/lib_dnsquery.c index 51740ce58d4..d3231a9adf6 100644 --- a/libs/libc/netdb/lib_dnsquery.c +++ b/libs/libc/netdb/lib_dnsquery.c @@ -140,7 +140,7 @@ static ssize_t stream_send(int fd, FAR const void *buf, size_t len) break; } - buf = (FAR const uint8_t *)buf + len; + buf = (FAR const uint8_t *)buf + ret; len -= ret; total += ret; } @@ -186,7 +186,7 @@ static ssize_t stream_recv(int fd, FAR void *buf, size_t len) break; } - buf = (FAR uint8_t *)buf + len; + buf = (FAR uint8_t *)buf + ret; len -= ret; total += ret; }