On Mon, Sep 08, 2003 at 03:40:58PM +0200, Alfred M. Szmidt wrote:
>    The glibc manual says these function can return an error, so we should check
>    for one.  But we should also check for NULL return values, it seems.  The
>    POSIX specification is not very clearly worded, but it seems that not
>    finding an entry is also a "successful" operation (no error value is defined
>    for an unsuccesful lookup if it failed  because the user does not exist).
> 
> I think that we should just check if the structure is NULL instead of
> checking the return value _and_ the structure, this is simpler, and
> cleaner.  As for what the glibc functions are supposed todo (set
> errno, or return something of use), thats a topic for libc-alpha.
> I'll report it there in a few days.

Well, as I said, the POSIX standard seems to be clear by omission here.  As
far as checking for NULL: POSIX says that NULL should be returned in case of
an error, so that's ok to do.
 
Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    [EMAIL PROTECTED]
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/
[EMAIL PROTECTED]
http://www.marcus-brinkmann.de/


_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to