bug-hurd
[Top][All Lists]
Advanced

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

Re: bugs in idvec-verify.c, almost...


From: Marcus Brinkmann
Subject: Re: bugs in idvec-verify.c, almost...
Date: Mon, 8 Sep 2003 17:39:42 +0200
User-agent: Mutt/1.5.4i

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    marcus@gnu.org
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de/




reply via email to

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