diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-11-03 19:01:36 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2022-12-15 07:31:55 -0500 | 
| commit | 881979e427b394c451719ff9c0639e8e56421908 (patch) | |
| tree | a7ce140b99c6fcdcbaf5e467e50133d17360fe91 | |
| parent | 9da878b66abb654c46b99e529bb01e7878999a9f (diff) | |
bgpd: use the enum instead of an int
The bgp_fsm_change_status function takes an int
for the new bgp state, which is an `enum bgp_fsm_status status`
let's convert over to being explicit.bgpd: use the enum instead of an int
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| -rw-r--r-- | bgpd/bgp_fsm.c | 2 | ||||
| -rw-r--r-- | bgpd/bgp_fsm.h | 3 | 
2 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index 65de35cbdb..923586f633 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -1245,7 +1245,7 @@ static void bgp_update_delay_process_status_change(struct peer *peer)  /* Called after event occurred, this function change status and reset     read/write and timer thread. */ -void bgp_fsm_change_status(struct peer *peer, int status) +void bgp_fsm_change_status(struct peer *peer, enum bgp_fsm_status status)  {  	struct bgp *bgp;  	uint32_t peer_count; diff --git a/bgpd/bgp_fsm.h b/bgpd/bgp_fsm.h index 368c2c5001..6418e15b9a 100644 --- a/bgpd/bgp_fsm.h +++ b/bgpd/bgp_fsm.h @@ -125,7 +125,8 @@ extern int bgp_event_update(struct peer *, enum bgp_fsm_events event);  extern int bgp_stop(struct peer *peer);  extern void bgp_timer_set(struct peer *);  extern void bgp_routeadv_timer(struct thread *); -extern void bgp_fsm_change_status(struct peer *peer, int status); +extern void bgp_fsm_change_status(struct peer *peer, +				  enum bgp_fsm_status status);  extern const char *const peer_down_str[];  extern void bgp_update_delay_end(struct bgp *);  extern void bgp_maxmed_update(struct bgp *);  | 
