summaryrefslogtreecommitdiff
path: root/vrrpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-02-22 19:04:25 -0500
committerDonald Sharp <sharpd@nvidia.com>2022-02-23 19:56:04 -0500
commitcc9f21da2218d95567eff1501482ce58e6600f54 (patch)
treed579c9754161d874bad6eb09c67821b65fb559ca /vrrpd
parenteaba619fc183f68a456b3918f449185b3b477426 (diff)
*: Change thread->func to return void instead of int
The int return value is never used. Modify the code base to just return a void instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'vrrpd')
-rw-r--r--vrrpd/vrrp.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c
index f91803337d..dae1e4894e 100644
--- a/vrrpd/vrrp.c
+++ b/vrrpd/vrrp.c
@@ -681,8 +681,8 @@ struct vrrp_vrouter *vrrp_lookup(const struct interface *ifp, uint8_t vrid)
/* Forward decls */
static void vrrp_change_state(struct vrrp_router *r, int to);
-static int vrrp_adver_timer_expire(struct thread *thread);
-static int vrrp_master_down_timer_expire(struct thread *thread);
+static void vrrp_adver_timer_expire(struct thread *thread);
+static void vrrp_master_down_timer_expire(struct thread *thread);
/*
* Finds the first connected address of the appropriate family on a VRRP
@@ -983,7 +983,7 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src,
/*
* Read and process next IPvX datagram.
*/
-static int vrrp_read(struct thread *thread)
+static void vrrp_read(struct thread *thread)
{
struct vrrp_router *r = thread->arg;
@@ -1045,8 +1045,6 @@ done:
if (resched)
thread_add_read(master, vrrp_read, r, r->sock_rx, &r->t_read);
-
- return 0;
}
/*
@@ -1480,7 +1478,7 @@ static void vrrp_change_state(struct vrrp_router *r, int to)
/*
* Called when Adver_Timer expires.
*/
-static int vrrp_adver_timer_expire(struct thread *thread)
+static void vrrp_adver_timer_expire(struct thread *thread)
{
struct vrrp_router *r = thread->arg;
@@ -1503,14 +1501,12 @@ static int vrrp_adver_timer_expire(struct thread *thread)
r->vr->vrid, family2str(r->family),
vrrp_state_names[r->fsm.state]);
}
-
- return 0;
}
/*
* Called when Master_Down_Timer expires.
*/
-static int vrrp_master_down_timer_expire(struct thread *thread)
+static void vrrp_master_down_timer_expire(struct thread *thread)
{
struct vrrp_router *r = thread->arg;
@@ -1522,8 +1518,6 @@ static int vrrp_master_down_timer_expire(struct thread *thread)
r->vr->advertisement_interval * CS2MS,
&r->t_adver_timer);
vrrp_change_state(r, VRRP_STATE_MASTER);
-
- return 0;
}
/*