Jim Meyering wrote: >Derek Price <[EMAIL PROTECTED]> wrote: > > >>I've installed the attached patch. It is almost identical to my >>previous one, with a few extra portability and typo fixes. >> >>2005-09-12 Derek Price <[EMAIL PROTECTED]> >> >> * modules/canon-host: Add canon-host.h. Depend on getaddrinfo. Make >> LGPL. >> * modules/getaddrinfo: Add link to opengroup spec. Depend on strdup. >> >> > >Thanks for doing all of that. > >There is one small problem. >When strdup returns NULL, canon_host_r >returns NULL without setting *cherror. >Shouldn't that be fixed? > >
Yes. Thanks. I've installed the attached patch. 2005-09-13 Derek Price <[EMAIL PROTECTED]> * canon-host.c (canon_host_r): Set *cherror on memory allocation failure. Reported by Jim Meyering <[EMAIL PROTECTED]>. >I've checked in these cosmetic changes: > > Thanks. >That file was using an indentation style different from the style >used in nearly every other source file. I ran it through GNU indent. > > Thanks. I meant to do that and forgot. >Finally, we prefer to use an active voice (rather than passive voice) >in comments. So I changed this: > > Thanks. Regards, Derek -- Derek R. Price CVS Solutions Architect Ximbiot <http://ximbiot.com> v: +1 717.579.6168 f: +1 717.234.3125 <mailto:[EMAIL PROTECTED]>
Index: lib/canon-host.c =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/canon-host.c,v retrieving revision 1.20 diff -u -p -r1.20 canon-host.c --- lib/canon-host.c 13 Sep 2005 12:37:48 -0000 1.20 +++ lib/canon-host.c 13 Sep 2005 12:59:11 -0000 @@ -72,6 +72,8 @@ canon_host_r (char const *host, int *che if (!status) { retval = strdup (res->ai_canonname); + if (!retval && cherror) + *cherror = EAI_MEMORY; freeaddrinfo (res); } else if (cherror)
_______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib