Re: [PATCH] CLEANUP: dns: resolution can never be null

2019-11-28 Thread Willy Tarreau
On Thu, Nov 28, 2019 at 10:30:22AM +0100, Baptiste wrote: > I am personally all confused by this report :) > Furthermore, as mentioned the test on eb was already done. > If the fix is to remove the useless test on res, then William's patch is > right. Here coverity assumes that if eb is not 0, it

Re: [PATCH] CLEANUP: dns: resolution can never be null

2019-11-28 Thread Willy Tarreau
On Wed, Nov 27, 2019 at 11:32:41PM +0100, William Dauchy wrote: > `eb` being tested above, `res` cannot be null, so the condition is > not needed and introduces potential dead code. Now applied, thank you! Willy

Re: [PATCH] CLEANUP: dns: resolution can never be null

2019-11-28 Thread Baptiste
I am personally all confused by this report :) Furthermore, as mentioned the test on eb was already done. If the fix is to remove the useless test on res, then William's patch is right. (Thx for handling it William) Baptiste

Re: [PATCH] CLEANUP: dns: resolution can never be null

2019-11-28 Thread Илья Шипицин
indeed it is checked earlier https://github.com/haproxy/haproxy/blob/master/src/dns.c#L1574 чт, 28 нояб. 2019 г. в 12:18, William Dauchy : > On Thu, Nov 28, 2019 at 11:10:34AM +0500, Илья Шипицин wrote: > > Willy thinks it should be "eb" instead of "res" > > yup I saw that comment but I don't ge

Re: [PATCH] CLEANUP: dns: resolution can never be null

2019-11-27 Thread William Dauchy
On Thu, Nov 28, 2019 at 11:10:34AM +0500, Илья Шипицин wrote: > Willy thinks it should be "eb" instead of "res" yup I saw that comment but I don't get why as it is tested above. -- William

Re: [PATCH] CLEANUP: dns: resolution can never be null

2019-11-27 Thread Илья Шипицин
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 wrote: > `eb` being tested above, `res` cannot be null, so the condition is > not needed and introduces potential dead code. > > als

[PATCH] CLEANUP: dns: resolution can never be null

2019-11-27 Thread William Dauchy
`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 --- src/dns.c | 7 +-- 1 file changed, 1 insertion(+),