Author: delphij
Date: Thu Jun 29 06:28:54 2017
New Revision: 320468
URL: https://svnweb.freebsd.org/changeset/base/320468

Log:
  Don't bother to set target for SEEK_END.
  
  While there also collapase SEEK_END into default case in lseek.
  
  MFC after:    2 weeks

Modified:
  head/lib/libstand/bzipfs.c
  head/lib/libstand/gzipfs.c
  head/lib/libstand/lseek.c

Modified: head/lib/libstand/bzipfs.c
==============================================================================
--- head/lib/libstand/bzipfs.c  Thu Jun 29 04:33:55 2017        (r320467)
+++ head/lib/libstand/bzipfs.c  Thu Jun 29 06:28:54 2017        (r320468)
@@ -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);

Modified: head/lib/libstand/gzipfs.c
==============================================================================
--- head/lib/libstand/gzipfs.c  Thu Jun 29 04:33:55 2017        (r320467)
+++ head/lib/libstand/gzipfs.c  Thu Jun 29 06:28:54 2017        (r320468)
@@ -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);

Modified: head/lib/libstand/lseek.c
==============================================================================
--- head/lib/libstand/lseek.c   Thu Jun 29 04:33:55 2017        (r320467)
+++ head/lib/libstand/lseek.c   Thu Jun 29 06:28:54 2017        (r320468)
@@ -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);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to