diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | login/tst-ptsname.c | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/ptsname.c | 6 |
3 files changed, 6 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog index f74004b39a..4c06d7ef85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2017-06-07 Arjun Shankar <arjun.is@lostca.se> + * sysdeps/unix/sysv/linux/ptsname.c (__ptsname_internal): + Remove check for NULL 'buf'. + * login/tst-ptsname.c (do_test): Remove test with NULL 'buf'. + +2017-06-07 Arjun Shankar <arjun.is@lostca.se> + * sysdeps/unix/sysv/linux/tst-clone2.c: Do not include test-skeleton.c. Include support/check.h and support/test-driver.c. diff --git a/login/tst-ptsname.c b/login/tst-ptsname.c index be8744dfd0..96f0449788 100644 --- a/login/tst-ptsname.c +++ b/login/tst-ptsname.c @@ -70,7 +70,6 @@ do_test (void) if (fd != -1) { result |= do_single_test (fd, buf, sizeof (buf), 0); - result |= do_single_test (fd, NULL, sizeof (buf), EINVAL); result |= do_single_test (fd, buf, 1, ERANGE); close (fd); } diff --git a/sysdeps/unix/sysv/linux/ptsname.c b/sysdeps/unix/sysv/linux/ptsname.c index e3f2ae8ff2..41bb0bbb0e 100644 --- a/sysdeps/unix/sysv/linux/ptsname.c +++ b/sysdeps/unix/sysv/linux/ptsname.c @@ -72,12 +72,6 @@ __ptsname_internal (int fd, char *buf, size_t buflen, struct stat64 *stp) int save_errno = errno; unsigned int ptyno; - if (buf == NULL) - { - __set_errno (EINVAL); - return EINVAL; - } - if (!__isatty (fd)) { __set_errno (ENOTTY); |