summaryrefslogtreecommitdiffstats
path: root/pimd/pim_pim.c
diff options
context:
space:
mode:
authorSai Gomathi <nsaigomathi@vmware.com>2021-08-24 19:40:03 +0200
committerSai Gomathi <nsaigomathi@vmware.com>2021-08-24 19:40:03 +0200
commit50975049f3722cc2b06f1a640b61da1bdfe5acf7 (patch)
tree330f6e921e70050978ef17a7adfe70efca2d1ad0 /pimd/pim_pim.c
parentpimd: Fixing coverity issues (diff)
downloadfrr-50975049f3722cc2b06f1a640b61da1bdfe5acf7.tar.xz
frr-50975049f3722cc2b06f1a640b61da1bdfe5acf7.zip
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 <nsaigomathi@vmware.com>
Diffstat (limited to 'pimd/pim_pim.c')
-rw-r--r--pimd/pim_pim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c
index 2c2aebc61..8c38cf6c4 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) {