Willy thinks it should be "eb" instead of "res"

https://github.com/haproxy/haproxy/issues/349#issuecomment-548241746

On Thu, Nov 28, 2019, 3:33 AM William Dauchy <w.dau...@criteo.com> wrote:

> `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