diff options
author | Donald Sharp <sharpd@nvidia.com> | 2022-02-23 01:04:25 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2022-02-24 01:56:04 +0100 |
commit | cc9f21da2218d95567eff1501482ce58e6600f54 (patch) | |
tree | d579c9754161d874bad6eb09c67821b65fb559ca /bgpd/rfapi | |
parent | Merge pull request #10621 from donaldsharp/cov_fun (diff) | |
download | frr-cc9f21da2218d95567eff1501482ce58e6600f54.tar.xz frr-cc9f21da2218d95567eff1501482ce58e6600f54.zip |
*: 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 'bgpd/rfapi')
-rw-r--r-- | bgpd/rfapi/rfapi_import.c | 14 | ||||
-rw-r--r-- | bgpd/rfapi/rfapi_import.h | 2 | ||||
-rw-r--r-- | bgpd/rfapi/rfapi_monitor.c | 7 | ||||
-rw-r--r-- | bgpd/rfapi/rfapi_rib.c | 4 | ||||
-rw-r--r-- | bgpd/rfapi/vnc_export_bgp.c | 4 |
5 files changed, 10 insertions, 21 deletions
diff --git a/bgpd/rfapi/rfapi_import.c b/bgpd/rfapi/rfapi_import.c index 1f60c6699..1d58c0331 100644 --- a/bgpd/rfapi/rfapi_import.c +++ b/bgpd/rfapi/rfapi_import.c @@ -2372,7 +2372,7 @@ static void rfapiMonitorEncapDelete(struct bgp_path_info *vpn_bpi) * quagga lib/thread.h says this must return int even though * it doesn't do anything with the return value */ -static int rfapiWithdrawTimerVPN(struct thread *t) +static void rfapiWithdrawTimerVPN(struct thread *t) { struct rfapi_withdraw *wcb = t->arg; struct bgp_path_info *bpi = wcb->info; @@ -2385,13 +2385,13 @@ static int rfapiWithdrawTimerVPN(struct thread *t) vnc_zlog_debug_verbose( "%s: NULL BGP pointer, assume shutdown race condition!!!", __func__); - return 0; + return; } if (CHECK_FLAG(bgp->flags, BGP_FLAG_DELETE_IN_PROGRESS)) { vnc_zlog_debug_verbose( "%s: BGP delete in progress, assume shutdown race condition!!!", __func__); - return 0; + return; } assert(wcb->node); assert(bpi); @@ -2503,7 +2503,6 @@ done: RFAPI_CHECK_REFCOUNT(wcb->node, SAFI_MPLS_VPN, 1 + wcb->lockoffset); agg_unlock_node(wcb->node); /* decr ref count */ XFREE(MTYPE_RFAPI_WITHDRAW, wcb); - return 0; } /* @@ -2674,7 +2673,7 @@ rfapiWithdrawEncapUpdateCachedUn(struct rfapi_import_table *import_table, return 0; } -static int rfapiWithdrawTimerEncap(struct thread *t) +static void rfapiWithdrawTimerEncap(struct thread *t) { struct rfapi_withdraw *wcb = t->arg; struct bgp_path_info *bpi = wcb->info; @@ -2748,7 +2747,6 @@ done: agg_unlock_node(wcb->node); /* decr ref count */ XFREE(MTYPE_RFAPI_WITHDRAW, wcb); skiplist_free(vpn_node_sl); - return 0; } @@ -2760,7 +2758,7 @@ static void rfapiBiStartWithdrawTimer(struct rfapi_import_table *import_table, struct agg_node *rn, struct bgp_path_info *bpi, afi_t afi, safi_t safi, - int (*timer_service_func)(struct thread *)) + void (*timer_service_func)(struct thread *)) { uint32_t lifetime; struct rfapi_withdraw *wcb; @@ -4062,7 +4060,7 @@ static void rfapiProcessPeerDownRt(struct peer *peer, struct agg_node *rn; struct bgp_path_info *bpi; struct agg_table *rt; - int (*timer_service_func)(struct thread *); + void (*timer_service_func)(struct thread *); assert(afi == AFI_IP || afi == AFI_IP6); diff --git a/bgpd/rfapi/rfapi_import.h b/bgpd/rfapi/rfapi_import.h index 50093111c..387e6c47c 100644 --- a/bgpd/rfapi/rfapi_import.h +++ b/bgpd/rfapi/rfapi_import.h @@ -126,8 +126,6 @@ extern void rfapiCheckRefcount(struct agg_node *rn, safi_t safi, extern int rfapiHasNonRemovedRoutes(struct agg_node *rn); -extern int rfapiProcessDeferredClose(struct thread *t); - extern int rfapiGetUnAddrOfVpnBi(struct bgp_path_info *bpi, struct prefix *p); extern void rfapiNexthop2Prefix(struct attr *attr, struct prefix *p); diff --git a/bgpd/rfapi/rfapi_monitor.c b/bgpd/rfapi/rfapi_monitor.c index ce916c104..58a0f8dea 100644 --- a/bgpd/rfapi/rfapi_monitor.c +++ b/bgpd/rfapi/rfapi_monitor.c @@ -731,7 +731,7 @@ void rfapiMonitorResponseRemovalOn(struct bgp *bgp) bgp->rfapi_cfg->flags &= ~BGP_VNC_CONFIG_RESPONSE_REMOVAL_DISABLE; } -static int rfapiMonitorTimerExpire(struct thread *t) +static void rfapiMonitorTimerExpire(struct thread *t) { struct rfapi_monitor_vpn *m = t->arg; @@ -740,8 +740,6 @@ static int rfapiMonitorTimerExpire(struct thread *t) /* delete the monitor */ rfapiMonitorDel(bgp_get_default(), m->rfd, &m->p); - - return 0; } static void rfapiMonitorTimerRestart(struct rfapi_monitor_vpn *m) @@ -1041,7 +1039,7 @@ void rfapiMonitorMovedUp(struct rfapi_import_table *import_table, } } -static int rfapiMonitorEthTimerExpire(struct thread *t) +static void rfapiMonitorEthTimerExpire(struct thread *t) { struct rfapi_monitor_eth *m = t->arg; @@ -1052,7 +1050,6 @@ static int rfapiMonitorEthTimerExpire(struct thread *t) rfapiMonitorEthDel(bgp_get_default(), m->rfd, &m->macaddr, m->logical_net_id); - return 0; } static void rfapiMonitorEthTimerRestart(struct rfapi_monitor_eth *m) diff --git a/bgpd/rfapi/rfapi_rib.c b/bgpd/rfapi/rfapi_rib.c index 6f555d368..ba0c576f1 100644 --- a/bgpd/rfapi/rfapi_rib.c +++ b/bgpd/rfapi/rfapi_rib.c @@ -291,7 +291,7 @@ struct rfapi_rib_tcb { /* * remove route from rib */ -static int rfapiRibExpireTimer(struct thread *t) +static void rfapiRibExpireTimer(struct thread *t) { struct rfapi_rib_tcb *tcb = t->arg; @@ -328,8 +328,6 @@ static int rfapiRibExpireTimer(struct thread *t) XFREE(MTYPE_RFAPI_RECENT_DELETE, tcb); RFAPI_RIB_CHECK_COUNTS(1, 0); - - return 0; } static void rfapiRibStartTimer(struct rfapi_descriptor *rfd, diff --git a/bgpd/rfapi/vnc_export_bgp.c b/bgpd/rfapi/vnc_export_bgp.c index 67c43a867..f4f2e1139 100644 --- a/bgpd/rfapi/vnc_export_bgp.c +++ b/bgpd/rfapi/vnc_export_bgp.c @@ -1728,7 +1728,7 @@ void vnc_direct_bgp_rh_add_route(struct bgp *bgp, afi_t afi, bgp_attr_unintern(&iattr); } -static int vncExportWithdrawTimer(struct thread *t) +static void vncExportWithdrawTimer(struct thread *t) { struct vnc_export_info *eti = t->arg; const struct prefix *p = agg_node_get_prefix(eti->node); @@ -1747,8 +1747,6 @@ static int vncExportWithdrawTimer(struct thread *t) * Free the eti */ vnc_eti_delete(eti); - - return 0; } /* |