apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Jacques Clar" <JJC...@novell.com>
Subject Re: [PATCH] apr_file_writev() on UNIX
Date Tue, 05 Oct 2004 01:29:48 GMT

>>> Cliff Woolley <jwoolley@virginia.edu> 10/04/04 7:08 PM >>>

>> +        *nbytes = vec[i].iov_len;

>Is there really a point to the above line?  *nbytes will always be
>overwritten before returning anyway, so why not just skip this line
and
>then:

>> +        if ((rv = apr_file_write(thefile, vec[i].iov_base, nbytes))
!=
>> APR_SUCCESS) {
>> +            *nbytes = bytes;
>> +            return rv;
>> +        }
>> +        else {
>> +            bytes += *nbytes;
>bytes += vec[i].iov_len;

>Thoughts?

I thought that the nbytes on the call for apr_file_write() is the
number of bytes to write.
Does that info needs to be passed in?
Should then be set to iov_len before the call. What do I miss there?
 
 
Thanks,
JJ

Mime
View raw message