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;