diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-23 23:36:47 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-23 23:36:47 +0000 |
commit | 4e12b1a2a9e68685dff61acaee1e1f6c377d978c (patch) | |
tree | 6d2745f77060d05f843eb186c5227246667d33cb /coreutils/tty.c | |
parent | b3523b9cd3ba71b82e36466b17aae3d65a53203e (diff) | |
download | busybox-w32-4e12b1a2a9e68685dff61acaee1e1f6c377d978c.tar.gz busybox-w32-4e12b1a2a9e68685dff61acaee1e1f6c377d978c.tar.bz2 busybox-w32-4e12b1a2a9e68685dff61acaee1e1f6c377d978c.zip |
libbb: introduce and use xmalloc_ttyname (-32 in bss).
ash: small code shrink
text data bss dec hex filename
793669 504 7524 801697 c3ba1 busybox_old
793659 504 7492 801655 c3b77 busybox_unstripped
Diffstat (limited to 'coreutils/tty.c')
-rw-r--r-- | coreutils/tty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/tty.c b/coreutils/tty.c index e83289440..d49fb50b6 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)) | |||
30 | 30 | ||
31 | retval = 0; | 31 | retval = 0; |
32 | 32 | ||
33 | s = ttyname(0); | 33 | s = xmalloc_ttyname(0); |
34 | if (s == NULL) { | 34 | if (s == NULL) { |
35 | /* According to SUSv3, ttyname can fail with EBADF or ENOTTY. | 35 | /* According to SUSv3, ttyname can fail with EBADF or ENOTTY. |
36 | * We know the file descriptor is good, so failure means not a tty. */ | 36 | * We know the file descriptor is good, so failure means not a tty. */ |