aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-07-26 22:57:51 +0000
committerMike Frysinger <vapier@gentoo.org>2005-07-26 22:57:51 +0000
commitdbc049fda45ab9527c893c9d942528edd8e35905 (patch)
tree7ff2949baccc0c2382bf9fc47e0112fa16ecd025
parent6e05312ba96de7623664cb8db3d50706774bffb9 (diff)
downloadbusybox-w32-dbc049fda45ab9527c893c9d942528edd8e35905.tar.gz
busybox-w32-dbc049fda45ab9527c893c9d942528edd8e35905.tar.bz2
busybox-w32-dbc049fda45ab9527c893c9d942528edd8e35905.zip
remove unused variable ret as reported by apgo in Bug 350 and touchup syntax along the way
-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;