summaryrefslogtreecommitdiff
path: root/lib/northbound_grpc.cpp
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2022-02-24 01:43:48 -0500
committerGitHub <noreply@github.com>2022-02-24 01:43:48 -0500
commit7bf63db79b7848b73e1cef49f3496038644bea16 (patch)
tree2c95921d910689673348e60f9614de7d9d00c4e7 /lib/northbound_grpc.cpp
parentca6c97340b013e140c0cb31737858f7c672b7dfb (diff)
parentcc9f21da2218d95567eff1501482ce58e6600f54 (diff)
Merge pull request #10632 from donaldsharp/thread_return_null
*: Change thread->func to return void instead of int
Diffstat (limited to 'lib/northbound_grpc.cpp')
-rw-r--r--lib/northbound_grpc.cpp9
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)