svn commit: r1925640 - in /apr/apr-util/branches/1.7.x: ./ buckets/apr_brigade.c

[email protected]
Newsgroups gmane.comp.apache.apr.cvs
Message-ID <[email protected]>
Author: ivan
Date: Sat May 17 15:03:51 2025
New Revision: 1925640

URL: http://svn.apache.org/viewvc?rev=1925640&view=rev
Log:
Merge r1925634 from apr/trunk.

Modified:
    apr/apr-util/branches/1.7.x/   (props changed)
    apr/apr-util/branches/1.7.x/buckets/apr_brigade.c

Propchange: apr/apr-util/branches/1.7.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1925634

Modified: apr/apr-util/branches/1.7.x/buckets/apr_brigade.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.7.x/buckets/apr_brigade.c?rev=1925640&r1=1925639&r2=1925640&view=diff
==============================================================================
--- apr/apr-util/branches/1.7.x/buckets/apr_brigade.c (original)
+++ apr/apr-util/branches/1.7.x/buckets/apr_brigade.c Sat May 17 15:03:51 2025
@@ -328,9 +328,10 @@ APU_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);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.