]> git.proxmox.com Git - mirror_frr.git/commitdiff
pimd: fix incorrect bool returns
authorIgor Ryzhov <iryzhov@nfware.com>
Tue, 27 Jul 2021 08:41:36 +0000 (11:41 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Tue, 27 Jul 2021 08:41:36 +0000 (11:41 +0300)
-1 is true when casted to bool.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
pimd/pim_igmp.c

index 3325b6ee34989d210024139b1ef98c5ecb2d6dda..a4e006606fd35bcd5ac638cfe30d5d591844cf9f 100644 (file)
@@ -494,7 +494,7 @@ bool pim_igmp_verify_header(struct ip *ip_hdr, size_t len, int igmp_msg_len,
                        zlog_warn(
                                "Recv IGMP packet with invalid ttl=%u, discarding the packet",
                                ip_hdr->ip_ttl);
-                       return -1;
+                       return false;
                }
        }
 
@@ -505,7 +505,7 @@ bool pim_igmp_verify_header(struct ip *ip_hdr, size_t len, int igmp_msg_len,
                if (ip_hdr->ip_tos != IPTOS_PREC_INTERNETCONTROL) {
                        zlog_warn("Received IGMP Packet with invalid TOS %u",
                                  ip_hdr->ip_tos);
-                       return -1;
+                       return false;
                }
        }