apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: apr file questions
Date Thu, 18 Apr 2002 14:40:12 GMT
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)
             {
                ...
             }

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Mime
View raw message