mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 20:27:03 +00:00
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 <sharpd@nvidia.com>
This commit is contained in:
parent
38ec6e680d
commit
45f68cb8b4
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user