svn commit: r1925634 - /apr/apr/trunk/buckets/apr_brigade.c
| Newsgroups | gmane.comp.apache.apr.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: ivan
Date: Sat May 17 14:39:49 2025
New Revision: 1925634
URL: http://svn.apache.org/viewvc?rev=1925634&view=rev
Log:
* buckets/apr_brigade.c
(apr_brigade_split_line): Factor-out local variable.
Modified:
apr/apr/trunk/buckets/apr_brigade.c
Modified: apr/apr/trunk/buckets/apr_brigade.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/buckets/apr_brigade.c?rev=1925634&r1=1925633&r2=1925634&view=diff
==============================================================================
--- apr/apr/trunk/buckets/apr_brigade.c (original)
+++ apr/apr/trunk/buckets/apr_brigade.c Sat May 17 14:39:49 2025
@@ -359,9 +359,10 @@ APR_DECLARE(apr_status_t) apr_brigade_sp
pos = memchr(str, APR_ASCII_LF, len);
/* We found a match. */
if (pos != NULL) {
+ apr_size_t linelen = pos - str + 1;
/* Split if the LF is not the last character in the bucket. */
- if ((pos - str + 1) < len) {
- apr_bucket_split(e, pos - str + 1);
+ if (linelen < len) {
+ apr_bucket_split(e, linelen);
}
APR_BUCKET_REMOVE(e);
APR_BRIGADE_INSERT_TAIL(bbOut, e);