diff options
author | Zhiyong Yang <zhiyong.yang@intel.com> | 2019-06-10 22:23:11 -0400 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-06-12 08:17:10 +0000 |
commit | 91c512913698ebe182c8da1d5d409f42a28dda3b (patch) | |
tree | 7983d6aaf05170a9f3d218f8d3ee43fb49aad209 /src/plugins/lacp/rx_machine.c | |
parent | 16ad61735efbf3f9933fdb9ef7987606ef060cfc (diff) |
lacp: cleanup unnecessary pointer cast
Change-Id: Idc3a7588dc73e7180a15b6ace3684d3c12986b9d
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Diffstat (limited to 'src/plugins/lacp/rx_machine.c')
-rw-r--r-- | src/plugins/lacp/rx_machine.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/plugins/lacp/rx_machine.c b/src/plugins/lacp/rx_machine.c index 070b9089cd2..293cdac846d 100644 --- a/src/plugins/lacp/rx_machine.c +++ b/src/plugins/lacp/rx_machine.c @@ -240,8 +240,8 @@ lacp_set_port_moved (vlib_main_t * vm, slave_if_t * sif, u8 val) int lacp_rx_action_initialize (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_set_port_unselected (vm, sif); lacp_record_default (sif); @@ -257,8 +257,8 @@ lacp_rx_action_initialize (void *p1, void *p2) int lacp_rx_action_port_disabled (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; sif->partner.state &= ~LACP_STATE_SYNCHRONIZATION; if (sif->port_moved) @@ -282,8 +282,8 @@ lacp_rx_action_port_disabled (void *p1, void *p2) int lacp_rx_action_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; u8 timer_expired; lacp_main_t *lm = &lacp_main; @@ -310,8 +310,8 @@ lacp_rx_action_expired (void *p1, void *p2) int lacp_rx_action_lacp_disabled (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_set_port_unselected (vm, sif); lacp_record_default (sif); @@ -324,8 +324,8 @@ lacp_rx_action_lacp_disabled (void *p1, void *p2) int lacp_rx_action_defaulted (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->current_while_timer); lacp_update_default_selected (vm, sif); @@ -363,8 +363,8 @@ lacp_port_is_moved (vlib_main_t * vm, slave_if_t * sif) int lacp_rx_action_current (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_main_t *lm = &lacp_main; lacp_update_selected (vm, sif); @@ -389,8 +389,7 @@ format_rx_event (u8 * s, va_list * args) {.str = NULL} }; int e = va_arg (*args, int); - lacp_event_struct *event_entry = - (lacp_event_struct *) & lacp_rx_event_array; + lacp_event_struct *event_entry = lacp_rx_event_array; if (e >= (sizeof (lacp_rx_event_array) / sizeof (*event_entry))) s = format (s, "Bad event %d", e); |