summaryrefslogtreecommitdiffstats
path: root/lib/resolver.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-02-23 01:04:25 +0100
committerDonald Sharp <sharpd@nvidia.com>2022-02-24 01:56:04 +0100
commitcc9f21da2218d95567eff1501482ce58e6600f54 (patch)
treed579c9754161d874bad6eb09c67821b65fb559ca /lib/resolver.c
parentMerge pull request #10621 from donaldsharp/cov_fun (diff)
downloadfrr-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 'lib/resolver.c')
-rw-r--r--lib/resolver.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/resolver.c b/lib/resolver.c
index 29138bbc8..93fa84bbe 100644
--- a/lib/resolver.c
+++ b/lib/resolver.c
@@ -104,17 +104,15 @@ static void resolver_fd_drop_maybe(struct resolver_fd *resfd)
static void resolver_update_timeouts(struct resolver_state *r);
-static int resolver_cb_timeout(struct thread *t)
+static void resolver_cb_timeout(struct thread *t)
{
struct resolver_state *r = THREAD_ARG(t);
ares_process(r->channel, NULL, NULL);
resolver_update_timeouts(r);
-
- return 0;
}
-static int resolver_cb_socket_readable(struct thread *t)
+static void resolver_cb_socket_readable(struct thread *t)
{
struct resolver_fd *resfd = THREAD_ARG(t);
struct resolver_state *r = resfd->state;
@@ -127,11 +125,9 @@ static int resolver_cb_socket_readable(struct thread *t)
*/
ares_process_fd(r->channel, resfd->fd, ARES_SOCKET_BAD);
resolver_update_timeouts(r);
-
- return 0;
}
-static int resolver_cb_socket_writable(struct thread *t)
+static void resolver_cb_socket_writable(struct thread *t)
{
struct resolver_fd *resfd = THREAD_ARG(t);
struct resolver_state *r = resfd->state;
@@ -144,8 +140,6 @@ static int resolver_cb_socket_writable(struct thread *t)
*/
ares_process_fd(r->channel, ARES_SOCKET_BAD, resfd->fd);
resolver_update_timeouts(r);
-
- return 0;
}
static void resolver_update_timeouts(struct resolver_state *r)
@@ -232,7 +226,7 @@ static void ares_address_cb(void *arg, int status, int timeouts,
callback(query, NULL, i, &addr[0]);
}
-static int resolver_cb_literal(struct thread *t)
+static void resolver_cb_literal(struct thread *t)
{
struct resolver_query *query = THREAD_ARG(t);
void (*callback)(struct resolver_query *, const char *, int,
@@ -242,7 +236,6 @@ static int resolver_cb_literal(struct thread *t)
query->callback = NULL;
callback(query, ARES_SUCCESS, 1, &query->literal_addr);
- return 0;
}
void resolver_resolve(struct resolver_query *query, int af, vrf_id_t vrf_id,