summaryrefslogtreecommitdiff
path: root/zebra/zebra_mlag.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-02-22 19:04:25 -0500
committerDonald Sharp <sharpd@nvidia.com>2022-02-23 19:56:04 -0500
commitcc9f21da2218d95567eff1501482ce58e6600f54 (patch)
treed579c9754161d874bad6eb09c67821b65fb559ca /zebra/zebra_mlag.c
parenteaba619fc183f68a456b3918f449185b3b477426 (diff)
*: 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 'zebra/zebra_mlag.c')
-rw-r--r--zebra/zebra_mlag.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/zebra/zebra_mlag.c b/zebra/zebra_mlag.c
index 40a2c94e2a..2042f94038 100644
--- a/zebra/zebra_mlag.c
+++ b/zebra/zebra_mlag.c
@@ -52,8 +52,8 @@ uint8_t mlag_rd_buffer[ZEBRA_MLAG_BUF_LIMIT];
static bool test_mlag_in_progress;
static int zebra_mlag_signal_write_thread(void);
-static int zebra_mlag_terminate_pthread(struct thread *event);
-static int zebra_mlag_post_data_from_main_thread(struct thread *thread);
+static void zebra_mlag_terminate_pthread(struct thread *event);
+static void zebra_mlag_post_data_from_main_thread(struct thread *thread);
static void zebra_mlag_publish_process_state(struct zserv *client,
zebra_message_types_t msg_type);
@@ -148,7 +148,7 @@ void zebra_mlag_process_mlag_data(uint8_t *data, uint32_t len)
* This thread reads the clients data from the Global queue and encodes with
* protobuf and pass on to the MLAG socket.
*/
-static int zebra_mlag_client_msg_handler(struct thread *event)
+static void zebra_mlag_client_msg_handler(struct thread *event)
{
struct stream *s;
uint32_t wr_count = 0;
@@ -209,7 +209,6 @@ static int zebra_mlag_client_msg_handler(struct thread *event)
*/
if (wr_count >= ZEBRA_MLAG_POST_LIMIT)
zebra_mlag_signal_write_thread();
- return 0;
}
/*
@@ -309,7 +308,7 @@ static void zebra_mlag_publish_process_state(struct zserv *client,
* main thread, because for that access was needed for clients list.
* so instead of forcing the locks, messages will be posted from main thread.
*/
-static int zebra_mlag_post_data_from_main_thread(struct thread *thread)
+static void zebra_mlag_post_data_from_main_thread(struct thread *thread)
{
struct stream *s = THREAD_ARG(thread);
struct stream *zebra_s = NULL;
@@ -319,7 +318,7 @@ static int zebra_mlag_post_data_from_main_thread(struct thread *thread)
uint32_t msg_len = 0;
if (!s)
- return -1;
+ return;
STREAM_GETL(s, msg_type);
if (IS_ZEBRA_DEBUG_MLAG)
@@ -356,12 +355,11 @@ static int zebra_mlag_post_data_from_main_thread(struct thread *thread)
}
stream_free(s);
- return 0;
+ return;
stream_failure:
stream_free(s);
if (zebra_s)
stream_free(zebra_s);
- return 0;
}
/*
@@ -394,7 +392,7 @@ static void zebra_mlag_spawn_pthread(void)
* all clients are un-registered for MLAG Updates, terminate the
* MLAG write thread
*/
-static int zebra_mlag_terminate_pthread(struct thread *event)
+static void zebra_mlag_terminate_pthread(struct thread *event)
{
if (IS_ZEBRA_DEBUG_MLAG)
zlog_debug("Zebra MLAG write thread terminate called");
@@ -403,7 +401,7 @@ static int zebra_mlag_terminate_pthread(struct thread *event)
if (IS_ZEBRA_DEBUG_MLAG)
zlog_debug(
"Zebra MLAG: still some clients are interested");
- return 0;
+ return;
}
frr_pthread_stop(zrouter.mlag_info.zebra_pth_mlag, NULL);
@@ -419,7 +417,6 @@ static int zebra_mlag_terminate_pthread(struct thread *event)
* Send Notification to clean private data
*/
hook_call(zebra_mlag_private_cleanup_data);
- return 0;
}
/*