[PATCH] Use an alias to `ptsname_r' in login/tst-ptsname.c

Arjun Shankar arjun.is@lostca.se
Thu May 25 21:37:00 GMT 2017


> > Given this, maybe in the case of `ptsname_r' it is enough to just drop
> > the specific test that tests with NULL, and leave the man-page
> > unchanged?
> 
> That's fine as well.  I don't know if others want to preserve the EINVAL
> handling.
> 
> > While we are at it, we could also drop the test for NULL in
> > `ptsname_r'. How does that sound for a PATCH v2?
> 
> That would require updating the manpage, wouldn't it?

My argument behind both of these suggestions was that `pthread_create'
doesn't care about both of these things (i.e. it doesn't check that the
`pthread_t' pointer is not NULL; it just writes to it. And it doesn't
explicitly mention in the man-page that the pointer is required to be
valid and of sufficient size) - and therefore `ptsname_r' doesn't
require these things either.

Am I reasoning about this correctly?



More information about the Libc-alpha mailing list