bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: canon-host errors


From: Jim Meyering
Subject: Re: canon-host errors
Date: Tue, 13 Sep 2005 14:39:22 +0200

Derek Price <address@hidden> 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  <address@hidden>
>
>     * 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?

I've checked in these cosmetic changes:

That file was using an indentation style different from the style
used in nearly every other source file.  I ran it through GNU indent.

Finally, we prefer to use an active voice (rather than passive voice)
in comments.  So I changed this:

/* Returns a malloc'd string containing the canonical hostname associated with
   HOST, or NULL if a canonical name cannot be determined.  On NULL return, if
   CHERROR is not NULL, *CHERROR will be set to an error code as returned by
   getaddrinfo().  Error codes from CHERROR may be converted to a string
   suitable for error messages by ch_strerror_r() or gai_strerror().

to this:

/* Return a malloc'd string containing the canonical hostname associated with
   HOST, or NULL if a canonical name cannot be determined.  On NULL return,
   if CHERROR is not NULL, set *CHERROR to an error code as returned by
   getaddrinfo().  Use ch_strerror_r() or gai_strerror() to convert a *CHERROR
   value to a string suitable for error messages.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]