[BusyBox-cvs] svn commit: trunk/busybox/coreutils
landley at busybox.net
landley at busybox.net
Sat Aug 13 00:35:01 UTC 2005
Author: landley
Date: 2005-08-12 18:35:00 -0600 (Fri, 12 Aug 2005)
New Revision: 11128
Log:
Very minor tweak to tail.
Modified:
trunk/busybox/coreutils/tail.c
Changeset:
Modified: trunk/busybox/coreutils/tail.c
===================================================================
--- trunk/busybox/coreutils/tail.c 2005-08-13 00:26:01 UTC (rev 11127)
+++ trunk/busybox/coreutils/tail.c 2005-08-13 00:35:00 UTC (rev 11128)
@@ -85,10 +85,7 @@
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;
More information about the busybox-cvs
mailing list