summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorMike Frysinger2005-07-26 22:57:51 +0000
committerMike Frysinger2005-07-26 22:57:51 +0000
commitdbc049fda45ab9527c893c9d942528edd8e35905 (patch)
tree7ff2949baccc0c2382bf9fc47e0112fa16ecd025 /coreutils
parent6e05312ba96de7623664cb8db3d50706774bffb9 (diff)
downloadbusybox-dbc049fda45ab9527c893c9d942528edd8e35905.zip
busybox-dbc049fda45ab9527c893c9d942528edd8e35905.tar.gz
remove unused variable ret as reported by apgo in Bug 350 and touchup syntax along the way
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/tail.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/coreutils/tail.c b/coreutils/tail.c
index d495399..f330ab1 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)
ssize_t r;
off_t current,end;
struct stat sbuf;
- int ret;
- end = current = lseek (fd, 0, SEEK_CUR);
- if (!fstat(fd, &sbuf)){
- end = sbuf.st_size;
- }
- if ( end < current) {
+ end = current = lseek(fd, 0, SEEK_CUR);
+ if (!fstat(fd, &sbuf))
+ end = sbuf.st_size;
+ if (end < current)
lseek(fd, 0, SEEK_SET);
- } else {
+ else
lseek(fd, current, SEEK_SET);
- }
if ((r = safe_read(fd, buf, count)) < 0) {
bb_perror_msg("read");
status = EXIT_FAILURE;