diff options
| author | Christian Hopps <chopps@labn.net> | 2022-02-24 01:43:48 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-24 01:43:48 -0500 |
| commit | 7bf63db79b7848b73e1cef49f3496038644bea16 (patch) | |
| tree | 2c95921d910689673348e60f9614de7d9d00c4e7 /zebra/zebra_mlag.c | |
| parent | ca6c97340b013e140c0cb31737858f7c672b7dfb (diff) | |
| parent | cc9f21da2218d95567eff1501482ce58e6600f54 (diff) | |
Merge pull request #10632 from donaldsharp/thread_return_null
*: Change thread->func to return void instead of int
Diffstat (limited to 'zebra/zebra_mlag.c')
| -rw-r--r-- | zebra/zebra_mlag.c | 19 |
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; } /* |
