From: William Dauchy Date: Wed, 27 Nov 2019 22:32:41 +0000 (+0100) Subject: CLEANUP: dns: resolution can never be null X-Git-Tag: v2.2-dev1~230 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be8a387e9399d0848af03401c8df80cb6ddaecfc;p=thirdparty%2Fhaproxy.git CLEANUP: dns: resolution can never be null `eb` being tested above, `res` cannot be null, so the condition is not needed and introduces potential dead code. also fix a typo in associated comment This should fix issue #349 Reported-by: Илья Шипицин Signed-off-by: William Dauchy --- diff --git a/src/dns.c b/src/dns.c index 6e726bf961..c52f1cabef 100644 --- a/src/dns.c +++ b/src/dns.c @@ -1577,13 +1577,8 @@ static void dns_resolve_recv(struct dgram_conn *dgram) continue; } - /* known query id means a resolution in prgress */ + /* known query id means a resolution in progress */ res = eb32_entry(eb, struct dns_resolution, qid); - if (!res) { - ns->counters.outdated++; - continue; - } - /* number of responses received */ res->nb_responses++;