Re: Small improvements to Inet6 implementation (unix)

2010-09-02 Thread Alan Bateman
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);

Re: Small improvements to Inet6 implementation (unix)

2010-09-02 Thread Michael McMahon
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

Re: Small improvements to Inet6 implementation (unix)

2010-09-01 Thread Martin Buchholz
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)

Re: Small improvements to Inet6 implementation (unix)

2010-09-01 Thread Martin Buchholz
On Wed, Sep 1, 2010 at 06:27, Michael McMahon wrote: > Martin Buchholz wrote: > >> Hi net maintainers, >> >> I'd like you to do a code review. >> >> I got frustrated with incomplete information from exceptions thrown from >> java.net , so I hacked up some fixes for them. This is

Re: Small improvements to Inet6 implementation (unix)

2010-09-01 Thread Michael McMahon
Martin Buchholz wrote: Hi net maintainers, I'd like you to do a code review. I got frustrated with incomplete information from exceptions thrown from java.net , so I hacked up some fixes for them. This is the result. generify; remove compiler warnings, typos, casts; return

Re: Small improvements to Inet6 implementation (unix)

2010-08-31 Thread Alan Bateman
Martin Buchholz wrote: Hi net maintainers, I'd like you to do a code review. I got frustrated with incomplete information from exceptions thrown from java.net , so I hacked up some fixes for them. This is the result. generify; remove compiler warnings, typos, casts; return

Small improvements to Inet6 implementation (unix)

2010-08-30 Thread Martin Buchholz
Hi net maintainers, I'd like you to do a code review. I got frustrated with incomplete information from exceptions thrown from java.net, so I hacked up some fixes for them. This is the result. generify; remove compiler warnings, typos, casts; return status information via gai_strerror when geta