remove unused variable ret as reported by apgo in Bug 350 and touchup syntax along...
authorMike Frysinger <vapier@gentoo.org>
Tue, 26 Jul 2005 22:57:51 +0000 (22:57 -0000)
committerMike Frysinger <vapier@gentoo.org>
Tue, 26 Jul 2005 22:57:51 +0000 (22:57 -0000)
coreutils/tail.c

index d49539916be3c3f511228ab1ef82dbfa0435494a..f330ab1a19671872663b45be2c1cef59db94f1f7 100644 (file)
@@ -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;