projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9bd87b
)
Very minor tweak to tail.
author
Rob Landley
<rob@landley.net>
Sat, 13 Aug 2005 00:35:00 +0000
(
00:35
-0000)
committer
Rob Landley
<rob@landley.net>
Sat, 13 Aug 2005 00:35:00 +0000
(
00:35
-0000)
coreutils/tail.c
patch
|
blob
|
history
diff --git
a/coreutils/tail.c
b/coreutils/tail.c
index f330ab1a19671872663b45be2c1cef59db94f1f7..1db1e2b0f3dbe57b870315a07daf1c1c5932f6f7 100644
(file)
--- a/
coreutils/tail.c
+++ b/
coreutils/tail.c
@@
-85,10
+85,7
@@
static ssize_t tail_read(int fd, char *buf, size_t count)
end = current = lseek(fd, 0, SEEK_CUR);
if (!fstat(fd, &sbuf))
end = sbuf.st_size;
- if (end < current)
- lseek(fd, 0, SEEK_SET);
- else
- lseek(fd, current, SEEK_SET);
+ lseek(fd, end < current ? 0 : current, SEEK_SET);
if ((r = safe_read(fd, buf, count)) < 0) {
bb_perror_msg("read");
status = EXIT_FAILURE;