From e40828ee56eba80742439411f6e2c31f76e49b34 Mon Sep 17 00:00:00 2001 From: Brad House Date: Mon, 13 Nov 2023 15:56:07 -0500 Subject: [PATCH] SonarCloud: minor codesmells --- src/lib/ares_process.c | 2 +- src/tools/adig.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/ares_process.c b/src/lib/ares_process.c index 1de3ac1f..4ac9ecf3 100644 --- a/src/lib/ares_process.c +++ b/src/lib/ares_process.c @@ -797,7 +797,7 @@ static ares_status_t ares__append_tcpbuf(struct server_state *server, return ares__buf_append(server->tcp_send, query->qbuf, query->qlen); } -static size_t ares__calc_query_timeout(struct query *query) +static size_t ares__calc_query_timeout(const struct query *query) { const ares_channel_t *channel = query->channel; size_t timeplus = channel->timeout; diff --git a/src/tools/adig.c b/src/tools/adig.c index b367e322..35f4b224 100644 --- a/src/tools/adig.c +++ b/src/tools/adig.c @@ -236,7 +236,6 @@ static ares_bool_t read_cmdline(int argc, const char **argv, "%c requires an argument", state.optopt); return ARES_FALSE; - case '?': default: snprintf(config->error, sizeof(config->error), "unrecognized option: %c", state.optopt);