diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-02-22 19:04:25 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2022-02-23 19:56:04 -0500 |
| commit | cc9f21da2218d95567eff1501482ce58e6600f54 (patch) | |
| tree | d579c9754161d874bad6eb09c67821b65fb559ca /lib/northbound_grpc.cpp | |
| parent | eaba619fc183f68a456b3918f449185b3b477426 (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 'lib/northbound_grpc.cpp')
| -rw-r--r-- | lib/northbound_grpc.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/northbound_grpc.cpp b/lib/northbound_grpc.cpp index e227d0385c..34bb1e4986 100644 --- a/lib/northbound_grpc.cpp +++ b/lib/northbound_grpc.cpp @@ -206,7 +206,7 @@ template <typename Q, typename S> class NewRpcState : RpcStateBase } - static int c_callback(struct thread *thread) + static void c_callback(struct thread *thread) { auto _tag = static_cast<NewRpcState<Q, S> *>(thread->arg); /* @@ -225,7 +225,7 @@ template <typename Q, typename S> class NewRpcState : RpcStateBase pthread_cond_signal(&_tag->cond); pthread_mutex_unlock(&_tag->cmux); - return 0; + return; } NewRpcState<Q, S> *orig; @@ -1368,7 +1368,7 @@ static int frr_grpc_finish(void) * fork. This is done by scheduling this init function as an event task, since * the event loop doesn't run until after fork. */ -static int frr_grpc_module_very_late_init(struct thread *thread) +static void frr_grpc_module_very_late_init(struct thread *thread) { const char *args = THIS_MODULE->load_args; uint port = GRPC_DEFAULT_PORT; @@ -1386,11 +1386,10 @@ static int frr_grpc_module_very_late_init(struct thread *thread) if (frr_grpc_init(port) < 0) goto error; - return 0; + return; error: flog_err(EC_LIB_GRPC_INIT, "failed to initialize the gRPC module"); - return -1; } static int frr_grpc_module_late_init(struct thread_master *tm) |
