From 4e12b1a2a9e68685dff61acaee1e1f6c377d978c Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 23 Dec 2008 23:36:47 +0000 Subject: 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 --- loginutils/su.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'loginutils/su.c') diff --git a/loginutils/su.c b/loginutils/su.c index e7e0001c7..de8c18d25 100644 --- a/loginutils/su.c +++ b/loginutils/su.c @@ -44,7 +44,7 @@ int su_main(int argc UNUSED_PARAM, char **argv) But getlogin can fail -- usually due to lack of utmp entry. in this case resort to getpwuid. */ old_user = xstrdup(USE_FEATURE_UTMP(getlogin() ? : ) (pw = getpwuid(cur_uid)) ? pw->pw_name : ""); - tty = ttyname(2) ? : "none"; + tty = xmalloc_ttyname(2) ? : "none"; openlog(applet_name, 0, LOG_AUTH); } -- cgit v1.2.3