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: Илья Шипицин <chipitsine@gmail.com>
Signed-off-by: William Dauchy <w.dauchy@criteo.com>
This commit is contained in:
William Dauchy 2019-11-27 23:32:41 +01:00 committed by Willy Tarreau
parent b270e8166c
commit be8a387e93

View File

@ -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++;