You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2001/06/06 19:07:23 UTC

cvs commit: apr/file_io/win32 seek.c

wrowe       01/06/06 10:07:23

  Modified:    file_io/win32 seek.c
  Log:
    Default to success.
  
  Revision  Changes    Path
  1.18      +7 -1      apr/file_io/win32/seek.c
  
  Index: seek.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/win32/seek.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- seek.c	2001/06/06 16:04:56	1.17
  +++ seek.c	2001/06/06 17:07:21	1.18
  @@ -93,7 +93,7 @@
   APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t where, apr_off_t *offset)
   {
       apr_finfo_t finfo;
  -    apr_status_t rc = APR_EINVAL;
  +    apr_status_t rc = APR_SUCCESS;
   
       if (thefile->buffered) {
           switch (where) {
  @@ -111,6 +111,9 @@
                   if (rc == APR_SUCCESS)
                       rc = setptr(thefile, finfo.size - *offset);
                   break;
  +
  +            default:
  +                return APR_EINVAL;
           }
   
           *offset = thefile->filePtr + thefile->bufpos;
  @@ -131,6 +134,9 @@
                   if (rc == APR_SUCCESS && finfo.size - *offset < 0)
                       thefile->filePtr = finfo.size - *offset;
                   break;
  +
  +            default:
  +                return APR_EINVAL;
           }
           *offset = thefile->filePtr;
           return rc;