diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-25 01:14:14 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-25 01:14:14 +0000 |
commit | 30f892a0ee32ec556467e9f7bc7c46d4ed42f12e (patch) | |
tree | b0cade901552b736374fc60e975e902fe61b9a5f /miscutils/last.c | |
parent | 69dc3253972cbf6169abcaaef5fc7bc787a40075 (diff) | |
download | busybox-w32-30f892a0ee32ec556467e9f7bc7c46d4ed42f12e.tar.gz busybox-w32-30f892a0ee32ec556467e9f7bc7c46d4ed42f12e.tar.bz2 busybox-w32-30f892a0ee32ec556467e9f7bc7c46d4ed42f12e.zip |
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
Diffstat (limited to 'miscutils/last.c')
-rw-r--r-- | miscutils/last.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/miscutils/last.c b/miscutils/last.c index f25411881..a84e77644 100644 --- a/miscutils/last.c +++ b/miscutils/last.c | |||
@@ -118,9 +118,10 @@ int last_main(int argc, char **argv ATTRIBUTE_UNUSED) | |||
118 | printf("%-10s %-14s %-18s %-12.12s\n", | 118 | printf("%-10s %-14s %-18s %-12.12s\n", |
119 | ut.ut_user, ut.ut_line, ut.ut_host, ctime(&t_tmp) + 4); | 119 | ut.ut_user, ut.ut_line, ut.ut_host, ctime(&t_tmp) + 4); |
120 | next: | 120 | next: |
121 | if (!pos) | 121 | pos -= sizeof(ut); |
122 | if (pos <= 0) | ||
122 | break; /* done. */ | 123 | break; /* done. */ |
123 | pos = lseek(file, pos - sizeof(ut), SEEK_SET); | 124 | xlseek(file, pos, SEEK_SET); |
124 | } | 125 | } |
125 | 126 | ||
126 | fflush_stdout_and_exit(EXIT_SUCCESS); | 127 | fflush_stdout_and_exit(EXIT_SUCCESS); |