This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/4] getaddrinfo: Remove unnecessary variables and code


On Mon, Dec 09, 2013 at 08:37:18AM -0500, Pavel Simerda wrote:
> Variable 'end' in getaddrinfo() was only used to compute 'nresults'
> which was already computed in gaih_inet() and stored in 'naddrs'.
>
This needs know code in detail, it looks similir but I there is
following fragment that may mak these differ

 /* If we looked up IPv4 mapped address discard them here if
               the caller isn't interested in all address and we have
               found at least one IPv6 address.  */
            if (got_ipv6
                && (req->ai_flags & (AI_V4MAPPED|AI_ALL)) == AI_V4MAPPED
                && IN6_IS_ADDR_V4MAPPED (at2->addr))
              goto ignore;

 
> Variable 'last_i' was used at the end of getaddrinfo() even though
> it was always zero.
>

ok with last_i part.
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]