httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apache-2.0/src/lib/apr/file_io/win32 open.c readwrite.c
Date Thu, 20 Apr 2000 23:53:10 GMT
On Thu, 20 Apr 2000, dean gaudet wrote:
> On Wed, 19 Apr 2000, Greg Stein wrote:
> 
> > Dean had an excellent point here. ap_writev() callers already know that
> > only a portion of the bytes may be written, and they will compensate.
> > Therefore, the ap_writev() can be simplified to:
> > 
> > {
> >     if (nvec == 0) {
> >        *nbytes = 0;
> >        reutrn APR_SUCCESS;
> >     }
> 
> i think even that is redundant... ap_write() should handle a 0-byte write
> anyhow.
> 
> -dean
> 
> >     *nbytes = vec[0].iov_len;
> >     return ap_write(thefile, vec[0].iov_base, nbytes);
> > }


That check is to ensure that vec[0] can be done safely.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/


Mime
View raw message