From e748f180f5823a8ac29564ee394ece961523e025 Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Tue, 27 Jul 2021 11:41:36 +0300 Subject: [PATCH] pimd: fix incorrect bool returns -1 is true when casted to bool. Signed-off-by: Igor Ryzhov --- pimd/pim_igmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c index 3325b6ee3..a4e006606 100644 --- a/pimd/pim_igmp.c +++ b/pimd/pim_igmp.c @@ -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; } } -- 2.39.5