From: Sai Gomathi Date: Tue, 24 Aug 2021 17:40:03 +0000 (-0700) Subject: pimd: Fixing coverity issues X-Git-Tag: base_8.1~144^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F9480%2Fhead;p=mirror%2Ffrr.git pimd: Fixing coverity issues Problem ====== In pim_msg_send_frame api, the while loop was executed only once. Fix === while is changed to if, as in the code flow the while part is getting executed only once. Signed-off-by: Sai Gomathi --- diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c index 2c2aebc61f..8c38cf6c4c 100644 --- a/pimd/pim_pim.c +++ b/pimd/pim_pim.c @@ -513,7 +513,7 @@ static int pim_msg_send_frame(int fd, char *buf, size_t len, { struct ip *ip = (struct ip *)buf; - while (sendto(fd, buf, len, MSG_DONTWAIT, dst, salen) < 0) { + if (sendto(fd, buf, len, MSG_DONTWAIT, dst, salen) < 0) { char dst_str[INET_ADDRSTRLEN]; switch (errno) {