svn commit: trunk/busybox/coreutils
vda at busybox.net
vda at busybox.net
Tue Nov 13 09:26:22 PST 2007
Author: vda
Date: 2007-11-13 09:26:21 -0800 (Tue, 13 Nov 2007)
New Revision: 20416
Log:
who: code shrink by Tito <farmatito at tiscali.it>
function old new delta
who_main 271 259 -12
Modified:
trunk/busybox/coreutils/who.c
Changeset:
Modified: trunk/busybox/coreutils/who.c
===================================================================
--- trunk/busybox/coreutils/who.c 2007-11-13 17:13:31 UTC (rev 20415)
+++ trunk/busybox/coreutils/who.c 2007-11-13 17:26:21 UTC (rev 20416)
@@ -55,8 +55,6 @@
printf("USER TTY IDLE TIME HOST\n");
while ((ut = getutent()) != NULL) {
if (ut->ut_user[0] && ut->ut_type == USER_PROCESS) {
- time_t thyme = ut->ut_tv.tv_sec;
-
/* ut->ut_line is device name of tty - "/dev/" */
name = concat_path_file("/dev", ut->ut_line);
str6[0] = '?';
@@ -66,7 +64,7 @@
/* 15 chars for time: Nov 10 19:33:20 */
printf("%-10s %-8s %-9s %-15.15s %s\n",
ut->ut_user, ut->ut_line, str6,
- ctime(&thyme) + 4, ut->ut_host);
+ ctime(&(ut->ut_tv.tv_sec)) + 4, ut->ut_host);
if (ENABLE_FEATURE_CLEAN_UP)
free(name);
}
More information about the busybox-cvs
mailing list