Don't bother to set target for SEEK_END.
While there also collapase SEEK_END into default case in lseek. MFC after: 2 weeks
This commit is contained in:
parent
ee059e6369
commit
80bfc295ef
@ -320,8 +320,6 @@ bzf_seek(struct open_file *f, off_t offset, int where)
|
||||
case SEEK_CUR:
|
||||
target = offset + bzf->bzf_bzstream.total_out_lo32;
|
||||
break;
|
||||
case SEEK_END:
|
||||
target = -1;
|
||||
default:
|
||||
errno = EINVAL;
|
||||
return(-1);
|
||||
|
@ -300,8 +300,6 @@ zf_seek(struct open_file *f, off_t offset, int where)
|
||||
case SEEK_CUR:
|
||||
target = offset + zf->zf_zstream.total_out;
|
||||
break;
|
||||
case SEEK_END:
|
||||
target = -1;
|
||||
default:
|
||||
errno = EINVAL;
|
||||
return(-1);
|
||||
|
@ -87,7 +87,6 @@ lseek(int fd, off_t offset, int where)
|
||||
case SEEK_CUR:
|
||||
f->f_offset += offset;
|
||||
break;
|
||||
case SEEK_END:
|
||||
default:
|
||||
errno = EOFFSET;
|
||||
return (-1);
|
||||
|
Loading…
Reference in New Issue
Block a user