On Wed, Jun 26, 2013 at 11:53:39PM +0000, Thorsten Glaser wrote:
> Aurelien Jarno dixit:
> 
> >As the function is POSIX compliant, it looks like to me a documentation
> >issue. Should this bug be reassigned to manpages-dev to mention the fact
> >that the function might return NULL in case of error?
> 
> The NULL-in-case-of-error mentioned by POSIX is when the
> function is not implemented *at all*, i.e. all calls to
> it would fail independent of the input (and then, you’d
> have bigger problems).

This is *your* interpretation of POSIX. Quoting it, there is no
ambiguity that crypt can return NULL for any failure (i.e. not
successful completion):

| Upon successful completion, crypt() shall return a pointer to the
| encoded string. The first two bytes of the returned value shall be those
| of the salt argument. Otherwise, it shall return a null pointer and set
| errno to indicate the error.
 

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurel...@aurel32.net                 http://www.aurel32.net


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130627001037.ge13...@hall.aurel32.net

Reply via email to