remove unused variable ret as reported by apgo in Bug 350 and touchup syntax along the way
This commit is contained in:
parent
6e05312ba9
commit
dbc049fda4
@ -81,17 +81,14 @@ static ssize_t tail_read(int fd, char *buf, size_t count)
|
|||||||
ssize_t r;
|
ssize_t r;
|
||||||
off_t current,end;
|
off_t current,end;
|
||||||
struct stat sbuf;
|
struct stat sbuf;
|
||||||
int ret;
|
|
||||||
|
|
||||||
end = current = lseek (fd, 0, SEEK_CUR);
|
end = current = lseek(fd, 0, SEEK_CUR);
|
||||||
if (!fstat(fd, &sbuf)){
|
if (!fstat(fd, &sbuf))
|
||||||
end = sbuf.st_size;
|
end = sbuf.st_size;
|
||||||
}
|
if (end < current)
|
||||||
if ( end < current) {
|
|
||||||
lseek(fd, 0, SEEK_SET);
|
lseek(fd, 0, SEEK_SET);
|
||||||
} else {
|
else
|
||||||
lseek(fd, current, SEEK_SET);
|
lseek(fd, current, SEEK_SET);
|
||||||
}
|
|
||||||
if ((r = safe_read(fd, buf, count)) < 0) {
|
if ((r = safe_read(fd, buf, count)) < 0) {
|
||||||
bb_perror_msg("read");
|
bb_perror_msg("read");
|
||||||
status = EXIT_FAILURE;
|
status = EXIT_FAILURE;
|
||||||
|
Loading…
Reference in New Issue
Block a user