From 5b9a953381c5dd7e690251dfe690e0a61c2cb83e Mon Sep 17 00:00:00 2001 From: ligd Date: Fri, 22 Jul 2022 14:07:00 +0800 Subject: [PATCH] local: fix nx_style Signed-off-by: ligd --- net/local/local_recvutils.c | 4 ++-- net/local/local_sendpacket.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) 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;