Small improvements to Inet6 implementation (unix)
Michael McMahon
michael.x.mcmahon at oracle.com
Thu Sep 2 07:12:39 PDT 2010
Alan Bateman wrote:
> 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.
Me too. The original concern about building on platforms without IPv6
probably
doesn't apply any more so referring to gai_strerror() by name shouldn't
have been a problem
> I kinda liked the use of the diamond operator in the first webrev, but
> what you have now is okay with me to.
I guess it's down to personal preference then. I'd probably draw the
line at three parameters. Fewer than that,
I'd prefer to see them named. But, it's not a big deal anyway,
> In time I assume that the dynamic lookup of
> getaddrinfo/getnameinfo/etc. can go away (not for this change of course).
>
Right. as kind of said above.
- Michael.
More information about the net-dev
mailing list