aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-07-26 22:57:51 +0000
committervapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-07-26 22:57:51 +0000
commiteb0a02b24c65540f8da1ffa437a4b6d2f73b7fcc (patch)
tree7ff2949baccc0c2382bf9fc47e0112fa16ecd025
parent4859a12c54b1c50308256d719cfea4b58af95f19 (diff)
downloadbusybox-w32-eb0a02b24c65540f8da1ffa437a4b6d2f73b7fcc.tar.gz
busybox-w32-eb0a02b24c65540f8da1ffa437a4b6d2f73b7fcc.tar.bz2
busybox-w32-eb0a02b24c65540f8da1ffa437a4b6d2f73b7fcc.zip
remove unused variable ret as reported by apgo in Bug 350 and touchup syntax along the way
git-svn-id: svn://busybox.net/trunk/busybox@10920 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--coreutils/tail.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/coreutils/tail.c b/coreutils/tail.c
index d49539916..f330ab1a1 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -81,17 +81,14 @@ static ssize_t tail_read(int fd, char *buf, size_t count)
81 ssize_t r; 81 ssize_t r;
82 off_t current,end; 82 off_t current,end;
83 struct stat sbuf; 83 struct stat sbuf;
84 int ret;
85 84
86 end = current = lseek (fd, 0, SEEK_CUR); 85 end = current = lseek(fd, 0, SEEK_CUR);
87 if (!fstat(fd, &sbuf)){ 86 if (!fstat(fd, &sbuf))
88 end = sbuf.st_size; 87 end = sbuf.st_size;
89 } 88 if (end < current)
90 if ( end < current) {
91 lseek(fd, 0, SEEK_SET); 89 lseek(fd, 0, SEEK_SET);
92 } else { 90 else
93 lseek(fd, current, SEEK_SET); 91 lseek(fd, current, SEEK_SET);
94 }
95 if ((r = safe_read(fd, buf, count)) < 0) { 92 if ((r = safe_read(fd, buf, count)) < 0) {
96 bb_perror_msg("read"); 93 bb_perror_msg("read");
97 status = EXIT_FAILURE; 94 status = EXIT_FAILURE;