From 45f68cb8b4242f9a95732a4f94f9818fe4f3d94f Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 16 Jun 2022 15:14:29 -0400 Subject: [PATCH] nhrpd: r is always < 0 at some points of if else statements Since r is always < 0 at the last if/else there is no point in testing for it. Signed-off-by: Donald Sharp --- nhrpd/zbuf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nhrpd/zbuf.c b/nhrpd/zbuf.c index 9cc2b56245..3d54f4ed50 100644 --- a/nhrpd/zbuf.c +++ b/nhrpd/zbuf.c @@ -89,7 +89,7 @@ ssize_t zbuf_read(struct zbuf *zb, int fd, size_t maxlen) zb->tail += r; else if (r == 0) r = -2; - else if (r < 0 && ERRNO_IO_RETRY(errno)) + else if (ERRNO_IO_RETRY(errno)) r = 0; return r; @@ -109,7 +109,7 @@ ssize_t zbuf_write(struct zbuf *zb, int fd) zbuf_reset(zb); } else if (r == 0) r = -2; - else if (r < 0 && ERRNO_IO_RETRY(errno)) + else if (ERRNO_IO_RETRY(errno)) r = 0; return r; @@ -128,7 +128,7 @@ ssize_t zbuf_recv(struct zbuf *zb, int fd) zb->tail += r; else if (r == 0) r = -2; - else if (r < 0 && ERRNO_IO_RETRY(errno)) + else if (ERRNO_IO_RETRY(errno)) r = 0; return r; }