summaryrefslogtreecommitdiffstats
path: root/lib/imsg.c
diff options
context:
space:
mode:
authorpaco <paco@voltanet.io>2018-06-20 17:15:37 +0200
committerpaco <paco@voltanet.io>2018-06-20 22:25:28 +0200
commita2b6e694b17303f3faf2db29254b5ea4a4ae14b1 (patch)
treece3de528becaedc5611f3b17235e915a3f5fef64 /lib/imsg.c
parentMerge pull request #2459 from pacovn/Coverity_1469898_Uninitialized_scalar_va... (diff)
downloadfrr-a2b6e694b17303f3faf2db29254b5ea4a4ae14b1.tar.xz
frr-a2b6e694b17303f3faf2db29254b5ea4a4ae14b1.zip
bgpd isisd ldpd lib ospfd pimd: redundancy (infer)
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'lib/imsg.c')
-rw-r--r--lib/imsg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/imsg.c b/lib/imsg.c
index 6419f805a..542414072 100644
--- a/lib/imsg.c
+++ b/lib/imsg.c
@@ -77,7 +77,7 @@ ssize_t imsg_read(struct imsgbuf *ibuf)
char buf[CMSG_SPACE(sizeof(int) * 1)];
} cmsgbuf;
struct iovec iov;
- ssize_t n = -1;
+ ssize_t n;
int fd;
struct imsg_fd *ifd;
@@ -110,7 +110,8 @@ again:
return (-1);
}
- if ((n = recvmsg(ibuf->fd, &msg, 0)) == -1) {
+ n = recvmsg(ibuf->fd, &msg, 0);
+ if (n == -1) {
if (errno == EINTR)
goto again;
goto fail;