apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53740] New: Code clean up - remove duplicated logic in buckets/apr_brigade.c
Date Sun, 19 Aug 2012 22:02:24 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=53740

          Priority: P2
            Bug ID: 53740
          Assignee: bugs@apr.apache.org
           Summary: Code clean up - remove duplicated logic in
                    buckets/apr_brigade.c
          Severity: minor
    Classification: Unclassified
                OS: Windows XP
          Reporter: christophe.jaillet@wanadoo.fr
          Hardware: PC
            Status: NEW
           Version: HEAD
         Component: APR
           Product: APR

Created attachment 29252
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29252&action=edit
Proposed patch

Hi,

'apr_brigade_puts' has some logic to put by itself data in heap bucket at the
end of the brigade or call 'apr_brigade_write' in all other cases.

AFAIK, all this logic is already part of 'apr_brigade_write'.


This only difference I see is in computation of the remaining space :
'apr_brigade_puts'
        apr_size_t bytes_avail = h->alloc_len - bkt->length;
'apr_brigade_write'
        remaining = h->alloc_len - (e->length + (apr_size_t)e->start);

I don't really understand why it is different and what the 'e->start' stands
for.


Anyway, I think it is safe to simplify 'apr_brigade_puts'.

Best regards.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message