summaryrefslogtreecommitdiff
path: root/miscutils/last.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2008-06-01 10:10:22 +0000
committerBernhard Reutner-Fischer2008-06-01 10:10:22 +0000
commit62d85035895152c8232052dcfb1bbd3b549b7df9 (patch)
tree49c794fe1f2b108ddf394f6d0263d04b6a0973f5 /miscutils/last.c
parente0fd13e901253c5742f1e80778e149a0a07dc874 (diff)
downloadbusybox-62d85035895152c8232052dcfb1bbd3b549b7df9.zip
busybox-62d85035895152c8232052dcfb1bbd3b549b7df9.tar.gz
- 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
Diffstat (limited to 'miscutils/last.c')
-rw-r--r--miscutils/last.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/miscutils/last.c b/miscutils/last.c
index a84e776..a8800bf 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;
}