last: code shrink
function old new delta show_entry 319 311 -8 last_main 917 907 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-18) Total: -18 bytes
This commit is contained in:
@@ -118,9 +118,10 @@ int last_main(int argc, char **argv ATTRIBUTE_UNUSED)
|
||||
printf("%-10s %-14s %-18s %-12.12s\n",
|
||||
ut.ut_user, ut.ut_line, ut.ut_host, ctime(&t_tmp) + 4);
|
||||
next:
|
||||
if (!pos)
|
||||
pos -= sizeof(ut);
|
||||
if (pos <= 0)
|
||||
break; /* done. */
|
||||
pos = lseek(file, pos - sizeof(ut), SEEK_SET);
|
||||
xlseek(file, pos, SEEK_SET);
|
||||
}
|
||||
|
||||
fflush_stdout_and_exit(EXIT_SUCCESS);
|
||||
|
Reference in New Issue
Block a user