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
This commit is contained in:
Denis Vlasenko
2008-12-23 23:36:47 +00:00
parent b3523b9cd3
commit 4e12b1a2a9
9 changed files with 26 additions and 13 deletions

View File

@ -25,7 +25,7 @@ int mesg_main(int argc, char **argv)
if (--argc == 0
|| (argc == 1 && ((c = **++argv) == 'y' || c == 'n'))
) {
tty = ttyname(STDERR_FILENO);
tty = xmalloc_ttyname(STDERR_FILENO);
if (tty == NULL) {
tty = "ttyname";
} else if (stat(tty, &sb) == 0) {