diff options
author | Sami Kerola | 2013-08-27 12:48:54 +0200 |
---|---|---|
committer | Sami Kerola | 2013-08-29 19:14:09 +0200 |
commit | 4e01db8842507cf3f2cadab7efedfac8e3ba1423 (patch) | |
tree | 4b74066b95e5d66bc01996585cad8af36a64fe5d /login-utils/last.c | |
parent | docs: add --since and time option formats to last(1) manual (diff) | |
download | kernel-qcow2-util-linux-4e01db8842507cf3f2cadab7efedfac8e3ba1423.tar.gz kernel-qcow2-util-linux-4e01db8842507cf3f2cadab7efedfac8e3ba1423.tar.xz kernel-qcow2-util-linux-4e01db8842507cf3f2cadab7efedfac8e3ba1423.zip |
last: fix --present option logic error
Printing of sessions 'still logged in' was skipped because an error in
logic.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'login-utils/last.c')
-rw-r--r-- | login-utils/last.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/login-utils/last.c b/login-utils/last.c index e5a9c2432..3cbfa069d 100644 --- a/login-utils/last.c +++ b/login-utils/last.c @@ -293,7 +293,7 @@ static int list(struct utmp *p, time_t t, int what, time_t present) */ tmp = (time_t)p->ut_time; - if (present && (present < tmp || 0 == t || t < present)) + if (present && (present < tmp || (0 < t && t < present))) return 0; strcpy(logintime, ctime(&tmp)); |