diff options
author | Donald Sharp <sharpd@nvidia.com> | 2022-02-23 01:04:25 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2022-02-24 01:56:04 +0100 |
commit | cc9f21da2218d95567eff1501482ce58e6600f54 (patch) | |
tree | d579c9754161d874bad6eb09c67821b65fb559ca /nhrpd/nhrp_event.c | |
parent | Merge pull request #10621 from donaldsharp/cov_fun (diff) | |
download | frr-cc9f21da2218d95567eff1501482ce58e6600f54.tar.xz frr-cc9f21da2218d95567eff1501482ce58e6600f54.zip |
*: 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 'nhrpd/nhrp_event.c')
-rw-r--r-- | nhrpd/nhrp_event.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/nhrpd/nhrp_event.c b/nhrpd/nhrp_event.c index 206b2cacc..e46a6d17c 100644 --- a/nhrpd/nhrp_event.c +++ b/nhrpd/nhrp_event.c @@ -31,7 +31,7 @@ struct event_manager { uint8_t ibuf_data[4 * 1024]; }; -static int evmgr_reconnect(struct thread *t); +static void evmgr_reconnect(struct thread *t); static void evmgr_connection_error(struct event_manager *evmgr) { @@ -78,7 +78,7 @@ static void evmgr_recv_message(struct event_manager *evmgr, struct zbuf *zb) } } -static int evmgr_read(struct thread *t) +static void evmgr_read(struct thread *t) { struct event_manager *evmgr = THREAD_ARG(t); struct zbuf *ibuf = &evmgr->ibuf; @@ -86,7 +86,7 @@ static int evmgr_read(struct thread *t) if (zbuf_read(ibuf, evmgr->fd, (size_t)-1) < 0) { evmgr_connection_error(evmgr); - return 0; + return; } /* Process all messages in buffer */ @@ -94,10 +94,9 @@ static int evmgr_read(struct thread *t) evmgr_recv_message(evmgr, &msg); thread_add_read(master, evmgr_read, evmgr, evmgr->fd, &evmgr->t_read); - return 0; } -static int evmgr_write(struct thread *t) +static void evmgr_write(struct thread *t) { struct event_manager *evmgr = THREAD_ARG(t); int r; @@ -109,8 +108,6 @@ static int evmgr_write(struct thread *t) } else if (r < 0) { evmgr_connection_error(evmgr); } - - return 0; } static void evmgr_hexdump(struct zbuf *zb, const uint8_t *val, size_t vallen) @@ -186,13 +183,13 @@ static void evmgr_submit(struct event_manager *evmgr, struct zbuf *obuf) &evmgr->t_write); } -static int evmgr_reconnect(struct thread *t) +static void evmgr_reconnect(struct thread *t) { struct event_manager *evmgr = THREAD_ARG(t); int fd; if (evmgr->fd >= 0 || !nhrp_event_socket_path) - return 0; + return; fd = sock_open_unix(nhrp_event_socket_path); if (fd < 0) { @@ -201,14 +198,12 @@ static int evmgr_reconnect(struct thread *t) zbufq_reset(&evmgr->obuf); thread_add_timer(master, evmgr_reconnect, evmgr, 10, &evmgr->t_reconnect); - return 0; + return; } zlog_info("Connected to Event Manager"); evmgr->fd = fd; thread_add_read(master, evmgr_read, evmgr, evmgr->fd, &evmgr->t_read); - - return 0; } static struct event_manager evmgr_connection; |