You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by br...@apache.org on 2002/06/09 09:30:13 UTC

cvs commit: apr-util/buckets apr_brigade.c

brianp      2002/06/09 00:30:13

  Modified:    buckets  apr_brigade.c
  Log:
  Rearranged the order of a conditional within the inner
  loop of apr_brigade_partition to make it short-circuit
  more quickly in the common case
  
  Revision  Changes    Path
  1.42      +1 -1      apr-util/buckets/apr_brigade.c
  
  Index: apr_brigade.c
  ===================================================================
  RCS file: /home/cvs/apr-util/buckets/apr_brigade.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- apr_brigade.c	28 May 2002 21:07:35 -0000	1.41
  +++ apr_brigade.c	9 Jun 2002 07:30:13 -0000	1.42
  @@ -149,7 +149,7 @@
       }
   
       APR_BRIGADE_FOREACH(e, b) {
  -        if ((point > (apr_size_t)(-1)) && (e->length == (apr_size_t)(-1))) {
  +        if ((e->length == (apr_size_t)(-1)) && (point > (apr_size_t)(-1))) {
               /* XXX: point is too far out to simply split this bucket,
                * we must fix this bucket's size and keep going... */
               rv = apr_bucket_read(e, &s, &len, APR_BLOCK_READ);