← Commit list

782e3fc2b

Denys Vlasenko
Denys Vlasenko
2025-11-08
SUCCESS Duration: 162s

Subject

last: fix ignoring the first login entry

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0
gcc -Wp,-MD,applets/.usage.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer      -Iinclude -Iinclude -o applets/usage applets/usage.c

Build Log

(log yok)

Commit Diff GitHub →

util-linux/last.c+1 -1
@@ -157,7 +157,7 @@ int last_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
ut.ut_user, ut.ut_line, ut.ut_host, ctime(&t_tmp) + 4);
next:
pos -= sizeof(ut);
- if (pos <= 0)
+ if (pos < 0)
break; /* done. */
xlseek(file, pos, SEEK_SET);
}