apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: apr file questions
Date Thu, 18 Apr 2002 15:01:25 GMT
Cliff Woolley wrote:
> On 18 Apr 2002, Jeff Trawick wrote:
> 
> Since APR_EOF is one of the errors you might get back from
> apr_file_read(), I agree with Jeff.  This:
> 
> 
>>>         while (apr_file_read(file, buffer, &len) != APR_SUCCESS)
>>>         {
>>>            ...
>>>         }
>>
> 
> is probably preferable.  You'll most likely want to hang onto that return
> code, though, like this:
> 
>              while ((rc = apr_file_read(file, buffer, &len)) != APR_SUCCESS)
>              {
>                 ...
>              }

Thanks Cliff and Jeff. Now I know how to do it right.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Mime
View raw message