diff --git a/net/local/local_recvutils.c b/net/local/local_recvutils.c index ee67074d76..c9143754e1 100644 --- a/net/local/local_recvutils.c +++ b/net/local/local_recvutils.c @@ -80,12 +80,12 @@ int local_fifo_read(FAR struct file *filep, FAR uint8_t *buf, { ret = (int)nread; - if (nread == -EINTR) + if (ret == -EINTR) { ninfo("Ignoring signal\n"); continue; } - else if (nread == -EAGAIN) + else if (ret == -EAGAIN) { goto errout; } diff --git a/net/local/local_sendpacket.c b/net/local/local_sendpacket.c index 937c40a717..781bf83b7d 100644 --- a/net/local/local_sendpacket.c +++ b/net/local/local_sendpacket.c @@ -99,7 +99,6 @@ static int local_fifo_write(FAR struct file *filep, FAR const uint8_t *buf, nerr("ERROR: file_write failed: %zd\n", ret); break; } - } nwritten += ret;