summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-11-04 00:01:36 +0100
committerDonald Sharp <sharpd@nvidia.com>2022-12-15 13:31:55 +0100
commit881979e427b394c451719ff9c0639e8e56421908 (patch)
treea7ce140b99c6fcdcbaf5e467e50133d17360fe91
parentMerge pull request #12481 from kuldeepkash/topotests_startup (diff)
downloadfrr-881979e427b394c451719ff9c0639e8e56421908.tar.xz
frr-881979e427b394c451719ff9c0639e8e56421908.zip
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.c2
-rw-r--r--bgpd/bgp_fsm.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c
index 65de35cbd..923586f63 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 368c2c500..6418e15b9 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 *);