gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 03/08: Removed unneeded cast of MHD_CONTENT_READER_END_*


From: gnunet
Subject: [libmicrohttpd] 03/08: Removed unneeded cast of MHD_CONTENT_READER_END_* values
Date: Mon, 25 Oct 2021 15:58:53 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 03a73cf1a64abaad40f56c60dfc4fa1501dab89b
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Oct 25 14:59:52 2021 +0300

    Removed unneeded cast of MHD_CONTENT_READER_END_* values
---
 src/microhttpd/connection.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index b652005c..c103375b 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1053,8 +1053,8 @@ try_ready_normal_body (struct MHD_Connection *connection)
                        (size_t) MHD_MIN ((uint64_t) response->data_buffer_size,
                                          response->total_size
                                          - 
connection->response_write_position));
-  if ( (((ssize_t) MHD_CONTENT_READER_END_OF_STREAM) == ret) ||
-       (((ssize_t) MHD_CONTENT_READER_END_WITH_ERROR) == ret) )
+  if ( (MHD_CONTENT_READER_END_OF_STREAM == ret) ||
+       (MHD_CONTENT_READER_END_WITH_ERROR == ret) )
   {
     /* either error or http 1.0 transfer, close socket! */
     /* TODO: do not update total size, check whether response
@@ -1063,7 +1063,7 @@ try_ready_normal_body (struct MHD_Connection *connection)
 #if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
     MHD_mutex_unlock_chk_ (&response->mutex);
 #endif
-    if ( ((ssize_t) MHD_CONTENT_READER_END_OF_STREAM) == ret)
+    if (MHD_CONTENT_READER_END_OF_STREAM == ret)
       MHD_connection_close_ (connection,
                              MHD_REQUEST_TERMINATED_COMPLETED_OK);
     else
@@ -1192,7 +1192,7 @@ try_ready_chunked_body (struct MHD_Connection *connection,
                          &connection->write_buffer[max_chunk_hdr_len],
                          size_to_fill);
   }
-  if ( ((ssize_t) MHD_CONTENT_READER_END_WITH_ERROR) == ret)
+  if (MHD_CONTENT_READER_END_WITH_ERROR == ret)
   {
     /* error, close socket! */
     /* TODO: remove update of the response size */
@@ -1205,7 +1205,7 @@ try_ready_chunked_body (struct MHD_Connection *connection,
                               "Closing connection (application error 
generating response)."));
     return MHD_NO;
   }
-  if (((ssize_t) MHD_CONTENT_READER_END_OF_STREAM) == ret)
+  if (MHD_CONTENT_READER_END_OF_STREAM == ret)
   {
     *p_finished = true;
     /* TODO: remove update of the response 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]