You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Davi Arnaut <da...@haxent.com.br> on 2007/05/15 03:46:46 UTC

Re: svn commit: r538019 - /apr/apr/trunk/file_io/unix/seek.c

bojan@apache.org wrote:
> Author: bojan
> Date: Mon May 14 16:45:20 2007
> New Revision: 538019
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=538019
> Log:
> Avoid calling apr_file_flush_locked() on an unlocked file.
> 
> Modified:
>     apr/apr/trunk/file_io/unix/seek.c
> 
> Modified: apr/apr/trunk/file_io/unix/seek.c
> URL: http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/seek.c?view=diff&rev=538019&r1=538018&r2=538019
> ==============================================================================
> --- apr/apr/trunk/file_io/unix/seek.c (original)
> +++ apr/apr/trunk/file_io/unix/seek.c Mon May 14 16:45:20 2007
> @@ -101,5 +101,5 @@
>      if (ftruncate(fp->filedes, offset) == -1) {
>          return errno;
>      }
> -    return setptr(fp, offset);
> +    return apr_file_seek(fp, APR_SET, &offset);
>  }
> 
> 

Nice opportunity to document exactly what happens to the file offset.

--
Davi Arnaut