summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/tty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/tty.c b/coreutils/tty.c
index e832894..d49fb50 100644
--- a/coreutils/tty.c
+++ b/coreutils/tty.c
@@ -30,7 +30,7 @@ int tty_main(int argc, char **argv SKIP_INCLUDE_SUSv2(UNUSED_PARAM))
retval = 0;
- s = ttyname(0);
+ s = xmalloc_ttyname(0);
if (s == NULL) {
/* According to SUSv3, ttyname can fail with EBADF or ENOTTY.
* We know the file descriptor is good, so failure means not a tty. */