gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 01/04: Send reply: minor optimisation and readability


From: gnunet
Subject: [libmicrohttpd] 01/04: Send reply: minor optimisation and readability
Date: Sun, 13 Dec 2020 15:37:50 +0100

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 275990c32ffd8591f9b346c0d69fdd5cbd6eb7b1
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Dec 13 13:25:30 2020 +0300

    Send reply: minor optimisation and readability
---
 src/microhttpd/connection.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 100abbc0..72d7ba7e 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -2913,21 +2913,22 @@ MHD_connection_handle_write (struct MHD_Connection 
*connection)
     return;
   case MHD_CONNECTION_HEADERS_SENDING:
     {
+      struct MHD_Response *const resp = connection->response;
       const size_t wb_ready = connection->write_buffer_append_offset
                               - connection->write_buffer_send_offset;
       mhd_assert (connection->write_buffer_append_offset >= \
                   connection->write_buffer_send_offset);
-      mhd_assert (NULL != connection->response);
-      mhd_assert ( (0 == connection->response->data_size) || \
-                   (0 == connection->response->data_start) || \
-                   (NULL != connection->response->crc) );
+      mhd_assert (NULL != resp);
+      mhd_assert ( (0 == resp->data_size) || \
+                   (0 == resp->data_start) || \
+                   (NULL != resp->crc) );
       mhd_assert ( (0 == connection->response_write_position) || \
-                   (response->total_size ==
+                   (resp->total_size ==
                     connection->response_write_position) || \
                    (MHD_SIZE_UNKNOWN ==
                     connection->response_write_position) );
 
-      if ( (NULL == connection->response->crc) &&
+      if ( (NULL == resp->crc) &&
            (0 == connection->response_write_position) )
       {
         /* Send response headers alongside the response body, if the body
@@ -2936,8 +2937,8 @@ MHD_connection_handle_write (struct MHD_Connection 
*connection)
                                         &connection->write_buffer
                                         [connection->write_buffer_send_offset],
                                         wb_ready,
-                                        connection->response->data,
-                                        connection->response->data_size);
+                                        resp->data,
+                                        resp->data_size);
       }
       else
       {

-- 
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]