summaryrefslogtreecommitdiffstats
path: root/src/plugins/lacp/ptx_machine.c
diff options
context:
space:
mode:
authorZhiyong Yang <zhiyong.yang@intel.com>2019-06-10 22:23:11 -0400
committerDamjan Marion <dmarion@me.com>2019-06-12 08:17:10 +0000
commit91c512913698ebe182c8da1d5d409f42a28dda3b (patch)
tree7983d6aaf05170a9f3d218f8d3ee43fb49aad209 /src/plugins/lacp/ptx_machine.c
parent16ad61735efbf3f9933fdb9ef7987606ef060cfc (diff)
lacp: cleanup unnecessary pointer cast
Change-Id: Idc3a7588dc73e7180a15b6ace3684d3c12986b9d Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Diffstat (limited to 'src/plugins/lacp/ptx_machine.c')
-rw-r--r--src/plugins/lacp/ptx_machine.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/plugins/lacp/ptx_machine.c b/src/plugins/lacp/ptx_machine.c
index 7e604cc489d..b933a87e759 100644
--- a/src/plugins/lacp/ptx_machine.c
+++ b/src/plugins/lacp/ptx_machine.c
@@ -74,8 +74,8 @@ lacp_machine_t lacp_ptx_machine = {
int
lacp_ptx_action_no_periodic (void *p1, void *p2)
{
- vlib_main_t *vm = (vlib_main_t *) p1;
- slave_if_t *sif = (slave_if_t *) p2;
+ vlib_main_t *vm = p1;
+ slave_if_t *sif = p2;
lacp_stop_timer (&sif->periodic_timer);
lacp_ptx_post_short_timeout_event (vm, sif);
@@ -85,8 +85,8 @@ lacp_ptx_action_no_periodic (void *p1, void *p2)
int
lacp_ptx_action_slow_periodic (void *p1, void *p2)
{
- vlib_main_t *vm = (vlib_main_t *) p1;
- slave_if_t *sif = (slave_if_t *) p2;
+ vlib_main_t *vm = p1;
+ slave_if_t *sif = p2;
u8 timer_expired;
lacp_main_t *lm = &lacp_main;
@@ -115,8 +115,8 @@ lacp_ptx_action_slow_periodic (void *p1, void *p2)
int
lacp_ptx_action_fast_periodic (void *p1, void *p2)
{
- vlib_main_t *vm = (vlib_main_t *) p1;
- slave_if_t *sif = (slave_if_t *) p2;
+ vlib_main_t *vm = p1;
+ slave_if_t *sif = p2;
u8 timer_expired;
lacp_main_t *lm = &lacp_main;
@@ -150,8 +150,8 @@ lacp_ptx_action_fast_periodic (void *p1, void *p2)
int
lacp_ptx_action_timer_expired (void *p1, void *p2)
{
- vlib_main_t *vm = (vlib_main_t *) p1;
- slave_if_t *sif = (slave_if_t *) p2;
+ vlib_main_t *vm = p1;
+ slave_if_t *sif = p2;
if (!(sif->partner.state & LACP_STATE_LACP_ACTIVITY) &&
!(sif->actor.state & LACP_STATE_LACP_ACTIVITY))
@@ -183,8 +183,7 @@ format_ptx_event (u8 * s, va_list * args)
{.str = NULL}
};
int e = va_arg (*args, int);
- lacp_event_struct *event_entry =
- (lacp_event_struct *) & lacp_ptx_event_array;
+ lacp_event_struct *event_entry = lacp_ptx_event_array;
if (e >= (sizeof (lacp_ptx_event_array) / sizeof (*event_entry)))
s = format (s, "Bad event %d", e);