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 /ldpd/ldpd.c | |
| 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 'ldpd/ldpd.c')
| -rw-r--r-- | ldpd/ldpd.c | 30 | 
1 files changed, 9 insertions, 21 deletions
diff --git a/ldpd/ldpd.c b/ldpd/ldpd.c index 92cf24bd5d..a78d2b25d6 100644 --- a/ldpd/ldpd.c +++ b/ldpd/ldpd.c @@ -46,8 +46,8 @@  static void		 ldpd_shutdown(void);  static pid_t		 start_child(enum ldpd_process, char *, int, int); -static int		 main_dispatch_ldpe(struct thread *); -static int		 main_dispatch_lde(struct thread *); +static void main_dispatch_ldpe(struct thread *thread); +static void main_dispatch_lde(struct thread *thread);  static int		 main_imsg_send_ipc_sockets(struct imsgbuf *,  			    struct imsgbuf *);  static void		 main_imsg_send_net_sockets(int); @@ -219,7 +219,7 @@ FRR_DAEMON_INFO(ldpd, LDP,  	.n_yang_modules = array_size(ldpd_yang_modules),  ); -static int ldp_config_fork_apply(struct thread *t) +static void ldp_config_fork_apply(struct thread *t)  {  	/*  	 * So the frr_config_fork() function schedules @@ -231,8 +231,6 @@ static int ldp_config_fork_apply(struct thread *t)  	 * after the read in of the config.  	 */  	ldp_config_apply(NULL, vty_conf); - -	return 0;  }  int @@ -563,8 +561,7 @@ start_child(enum ldpd_process p, char *argv0, int fd_async, int fd_sync)  /* imsg handling */  /* ARGSUSED */ -static int -main_dispatch_ldpe(struct thread *thread) +static void main_dispatch_ldpe(struct thread *thread)  {  	struct imsgev		*iev = THREAD_ARG(thread);  	struct imsgbuf		*ibuf = &iev->ibuf; @@ -627,13 +624,10 @@ main_dispatch_ldpe(struct thread *thread)  		else  			kill(lde_pid, SIGTERM);  	} - -	return (0);  }  /* ARGSUSED */ -static int -main_dispatch_lde(struct thread *thread) +static void main_dispatch_lde(struct thread *thread)  {  	struct imsgev	*iev = THREAD_ARG(thread);  	struct imsgbuf	*ibuf = &iev->ibuf; @@ -735,13 +729,10 @@ main_dispatch_lde(struct thread *thread)  		else  			kill(ldpe_pid, SIGTERM);  	} - -	return (0);  }  /* ARGSUSED */ -int -ldp_write_handler(struct thread *thread) +void ldp_write_handler(struct thread *thread)  {  	struct imsgev	*iev = THREAD_ARG(thread);  	struct imsgbuf	*ibuf = &iev->ibuf; @@ -755,12 +746,10 @@ ldp_write_handler(struct thread *thread)  		/* this pipe is dead, so remove the event handlers */  		thread_cancel(&iev->ev_read);  		thread_cancel(&iev->ev_write); -		return (0); +		return;  	}  	imsg_event_add(iev); - -	return (0);  }  void @@ -828,9 +817,8 @@ evbuf_event_add(struct evbuf *eb)  				 &eb->ev);  } -void -evbuf_init(struct evbuf *eb, int fd, int (*handler)(struct thread *), -    void *arg) +void evbuf_init(struct evbuf *eb, int fd, void (*handler)(struct thread *), +		void *arg)  {  	msgbuf_init(&eb->wbuf);  	eb->wbuf.fd = fd;  | 
