gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 10/13: connection_maximize_write_buffer(): fixed comment


From: gnunet
Subject: [libmicrohttpd] 10/13: connection_maximize_write_buffer(): fixed comment
Date: Sat, 30 Oct 2021 19:17:27 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit db643107ffb0c90948ad34922f671fa8af0c08bd
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sat Oct 30 18:07:08 2021 +0300

    connection_maximize_write_buffer(): fixed comment
---
 src/microhttpd/connection.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 3161ab8f..faf61838 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1569,13 +1569,14 @@ connection_maximize_write_buffer (struct MHD_Connection 
*connection)
   if (0 != free_size)
   {
     new_size = c->write_buffer_size + free_size;
+    /* This function must not move the buffer position.
+     * MHD_pool_reallocate () may return the new position only if buffer was
+     * allocated 'from_end' or is not the last allocation,
+     * which should not happen. */
     new_buf = MHD_pool_reallocate (pool,
                                    c->write_buffer,
                                    c->write_buffer_size,
                                    new_size);
-    /* Buffer position must not be moved.
-     * Position could be moved only if buffer was allocated 'from_end',
-     * which cannot happen. */
     mhd_assert ((c->write_buffer == new_buf) || (NULL == c->write_buffer));
     c->write_buffer = new_buf;
     c->write_buffer_size = new_size;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]