summaryrefslogtreecommitdiff
path: root/pimd/pim_pim.c
diff options
context:
space:
mode:
authorSai Gomathi <nsaigomathi@vmware.com>2021-08-24 10:40:03 -0700
committerSai Gomathi <nsaigomathi@vmware.com>2021-08-24 10:40:03 -0700
commit50975049f3722cc2b06f1a640b61da1bdfe5acf7 (patch)
tree330f6e921e70050978ef17a7adfe70efca2d1ad0 /pimd/pim_pim.c
parent9a15529cdafe7b9f9785788afc2b4c399e2103ae (diff)
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 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) {