apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwool...@apache.org
Subject cvs commit: apr-util/buckets apr_buckets_file.c
Date Wed, 15 May 2002 23:17:43 GMT
jwoolley    02/05/15 16:17:43

  Modified:    buckets  apr_buckets_file.c
  Log:
  Due to the explicit return in the "then" case, the "else" is not strictly
  necessary, and IMO it's easier to read without wrapping that block in
  an else {}.  I wrote the thing, and it tripped me up reading it the way
  it was, so it MUST have been bad.  ;)
  
  Revision  Changes    Path
  1.73      +4 -5      apr-util/buckets/apr_buckets_file.c
  
  Index: apr_buckets_file.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_buckets_file.c,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -d -u -r1.72 -r1.73
  --- apr_buckets_file.c	15 May 2002 23:10:52 -0000	1.72
  +++ apr_buckets_file.c	15 May 2002 23:17:43 -0000	1.73
  @@ -91,13 +91,12 @@
   
       if (filelength > APR_MMAP_LIMIT) {
           if (apr_mmap_create(&mm, a->fd, fileoffset, APR_MMAP_LIMIT,
  -                            APR_MMAP_READ, p) != APR_SUCCESS) {
  +                            APR_MMAP_READ, p) != APR_SUCCESS)
  +        {
               return 0;
           }
  -        else {
  -            apr_bucket_split(e, APR_MMAP_LIMIT);
  -            filelength = APR_MMAP_LIMIT;
  -        }
  +        apr_bucket_split(e, APR_MMAP_LIMIT);
  +        filelength = APR_MMAP_LIMIT;
       }
       else if ((filelength < APR_MMAP_THRESHOLD) ||
                (apr_mmap_create(&mm, a->fd, fileoffset, filelength,
  
  
  

Mime
View raw message