From 62d85035895152c8232052dcfb1bbd3b549b7df9 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Sun, 1 Jun 2008 10:10:22 +0000 Subject: - use ut_user rather than ut_name (Cristian Ionescu-Idbohrn) - use ut_tv.tv_sec rather than ut_time (me) - shrink halt a little bit (me): halt_main 464 433 -31 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-31) Total: -31 bytes --- miscutils/last.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'miscutils/last.c') diff --git a/miscutils/last.c b/miscutils/last.c index a84e77644..a8800bfe6 100644 --- a/miscutils/last.c +++ b/miscutils/last.c @@ -83,17 +83,17 @@ int last_main(int argc, char **argv ATTRIBUTE_UNUSED) ut.ut_type = RUN_LVL; #endif } else { - if (ut.ut_name[0] == '\0' || strcmp(ut.ut_name, "LOGIN") == 0) { + if (ut.ut_user[0] == '\0' || strcmp(ut.ut_user, "LOGIN") == 0) { /* Don't bother. This means we can't find how long * someone was logged in for. Oh well. */ goto next; } if (ut.ut_type != DEAD_PROCESS - && ut.ut_name[0] && ut.ut_line[0] + && ut.ut_user[0] && ut.ut_line[0] ) { ut.ut_type = USER_PROCESS; } - if (strcmp(ut.ut_name, "date") == 0) { + if (strcmp(ut.ut_user, "date") == 0) { if (n == TYPE_OLD_TIME) { /* '|' */ ut.ut_type = OLD_TIME; } -- cgit v1.2.3