MINOR: quic: EINTR error ignored

This should fix Coverity CID 375050 in GH #1536 where EINTR errno was ignored due
to wrong do...while() loop usage.
This commit is contained in:
Frédéric Lécaille 2022-02-02 14:33:10 +01:00 committed by Amaury Denoyelle
parent 3916ca197e
commit 439c464250

View File

@ -233,14 +233,11 @@ void quic_sock_fd_iocb(int fd)
do {
ret = recvfrom(fd, dgram_buf, max_sz, 0,
(struct sockaddr *)&saddr, &saddrlen);
if (ret < 0) {
if (errno == EINTR)
continue;
if (errno == EAGAIN)
fd_cant_recv(fd);
if (ret < 0 && errno == EAGAIN) {
fd_cant_recv(fd);
goto out;
}
} while (0);
} while (ret < 0 && errno == EINTR);
b_add(buf, ret);
if (!quic_lstnr_dgram_dispatch(dgram_buf, ret, l, &saddr,