On 02/14/2011 08:10 PM, Dima Tisnek wrote:
> Sure, here it is:
>
> diff --git a/ares_init.c b/ares_init.c
> index d2f4a72..62e09b4 100644
> --- a/ares_init.c
> +++ b/ares_init.c
> @@ -1292,7 +1292,7 @@ static int config_sortlist(struct apattern
> **sortlist, int *nsort,
> if (!sortlist_alloc(sortlist, nsort,&pat))
> return ARES_ENOMEM;
> }
> - if (ipbufpfx[0]&&
> + else if (ipbufpfx[0]&&
> (bits = ares_inet_net_pton(AF_INET, ipbufpfx,&pat.addrV4,
> sizeof(pat.addrV4)))> 0)
> {
I agree it sounds reasonable only one of the branches in the loop
is executed. It's probably not an issue in practice as something can't
be parsed as both IPv6 and IPv4 (right?)
-- Tommie GannertReceived on 2011-02-22