summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-09-24 08:10:26 -0400
committerIgor Ryzhov <iryzhov@nfware.com>2020-10-06 15:54:25 +0300
commit41ef8ae40038acabb38e04defec99bea2837c977 (patch)
tree91d2d608e5a4ab11172915b3f4150c013f0362bb
parentfa1f8426a0b4fb49edc989126cc21b682df5db7f (diff)
pimd: NULL not 0
When handling data pointers explicity use NULL not 0. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r--pimd/pim_igmp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c
index 20f339d43f..ed580d7539 100644
--- a/pimd/pim_igmp.c
+++ b/pimd/pim_igmp.c
@@ -138,7 +138,7 @@ struct igmp_sock *pim_igmp_sock_lookup_ifaddr(struct list *igmp_sock_list,
if (ifaddr.s_addr == igmp->ifaddr.s_addr)
return igmp;
- return 0;
+ return NULL;
}
struct igmp_sock *igmp_sock_lookup_by_fd(struct list *igmp_sock_list, int fd)
@@ -150,7 +150,7 @@ struct igmp_sock *igmp_sock_lookup_by_fd(struct list *igmp_sock_list, int fd)
if (fd == igmp->fd)
return igmp;
- return 0;
+ return NULL;
}
static int pim_igmp_other_querier_expire(struct thread *t)
@@ -1004,7 +1004,7 @@ struct igmp_sock *pim_igmp_sock_add(struct list *igmp_sock_list,
if (fd < 0) {
zlog_warn("Could not open IGMP socket for %s on %s",
inet_ntoa(ifaddr), ifp->name);
- return 0;
+ return NULL;
}
sin.sin_family = AF_INET;
@@ -1013,7 +1013,7 @@ struct igmp_sock *pim_igmp_sock_add(struct list *igmp_sock_list,
if (bind(fd, (struct sockaddr *) &sin, sizeof(sin)) != 0) {
zlog_warn("Could not bind IGMP socket for %s on %s",
inet_ntoa(ifaddr), ifp->name);
- return 0;
+ return NULL;
}
igmp = igmp_sock_new(fd, ifaddr, ifp, mtrace_only);