Small improvements to Inet6 implementation (unix)

Alan Bateman Alan.Bateman at oracle.com
Thu Sep 2 07:03:36 PDT 2010


Martin Buchholz wrote:
> I just noticed that I get gai_strerror_ptr dynamically, but then 
> called gai_strerror directly and incorrectly.
> Here's a more robust way to get the error string:
>
>     const char *error_string =
>         (gai_strerror_ptr == NULL) ? NULL : 
> (*gai_strerror_ptr)(gai_error);
>     if (error_string == NULL)
>         error_string = "unknown error";
>
> Webrev regenerated.
>
> Martin
I looked through the new webrev and the changes look good to me. I kinda 
liked the use of the diamond operator in the first webrev, but what you 
have now is okay with me to. In time I assume that the dynamic lookup of 
getaddrinfo/getnameinfo/etc. can go away (not for this change of course).

-Alan.







More information about the net-dev mailing list