`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: Илья Шипицин <chipits...@gmail.com>
Signed-off-by: William Dauchy <w.dau...@criteo.com>
---
 src/dns.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/dns.c b/src/dns.c
index 6e726bf9..c52f1cab 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++;
 
-- 
2.24.0


Reply via email to