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 /babeld | |
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 'babeld')
-rw-r--r-- | babeld/babeld.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/babeld/babeld.c b/babeld/babeld.c index 0104620cd..a1e00bfb8 100644 --- a/babeld/babeld.c +++ b/babeld/babeld.c @@ -49,11 +49,11 @@ THE SOFTWARE. DEFINE_MGROUP(BABELD, "babeld"); DEFINE_MTYPE_STATIC(BABELD, BABEL, "Babel Structure"); -static int babel_init_routing_process(struct thread *thread); +static void babel_init_routing_process(struct thread *thread); static void babel_get_myid(void); static void babel_initial_noise(void); -static int babel_read_protocol (struct thread *thread); -static int babel_main_loop(struct thread *thread); +static void babel_read_protocol(struct thread *thread); +static void babel_main_loop(struct thread *thread); static void babel_set_timer(struct timeval *timeout); static void babel_fill_with_next_timeout(struct timeval *tv); static void @@ -175,8 +175,7 @@ fail: } /* thread reading entries form others babel daemons */ -static int -babel_read_protocol (struct thread *thread) +static void babel_read_protocol(struct thread *thread) { int rc; struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); @@ -207,14 +206,12 @@ babel_read_protocol (struct thread *thread) /* re-add thread */ thread_add_read(master, &babel_read_protocol, NULL, protocol_socket, &babel_routing_process->t_read); - return 0; } /* Zebra will give some information, especially about interfaces. This function must be call with a litte timeout wich may give zebra the time to do his job, making these inits have sense. */ -static int -babel_init_routing_process(struct thread *thread) +static void babel_init_routing_process(struct thread *thread) { myseqno = (frr_weak_random() & 0xFFFF); babel_get_myid(); @@ -222,7 +219,6 @@ babel_init_routing_process(struct thread *thread) debugf(BABEL_DEBUG_COMMON, "My ID is : %s.", format_eui64(myid)); babel_initial_noise(); babel_main_loop(thread);/* this function self-add to the t_update thread */ - return 0; } /* fill "myid" with an unique id (only if myid != {0}). */ @@ -327,8 +323,7 @@ babel_clean_routing_process(void) } /* Function used with timeout. */ -static int -babel_main_loop(struct thread *thread) +static void babel_main_loop(struct thread *thread) { struct timeval tv; struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); @@ -348,8 +343,8 @@ babel_main_loop(struct thread *thread) /* it happens often to have less than 1 ms, it's bad. */ timeval_add_msec(&tv, &tv, 300); babel_set_timer(&tv); - return 0; - } + return; + } gettime(&babel_now); @@ -410,7 +405,6 @@ babel_main_loop(struct thread *thread) } assert(0); /* this line should never be reach */ - return 0; } static void |