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:
Xin LI 2017-06-29 06:28:54 +00:00
parent ee059e6369
commit 80bfc295ef
3 changed files with 0 additions and 5 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);