aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-10-25 14:59:52 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-10-25 14:59:52 +0300
commit03a73cf1a64abaad40f56c60dfc4fa1501dab89b (patch)
tree3d9863bff27a19970f800e09dd6bac699ce06f48
parenta2798b7c7d4707effefc0ac95562670b0161c8d0 (diff)
downloadlibmicrohttpd-03a73cf1a64abaad40f56c60dfc4fa1501dab89b.tar.gz
libmicrohttpd-03a73cf1a64abaad40f56c60dfc4fa1501dab89b.zip
Removed unneeded cast of MHD_CONTENT_READER_END_* values
-rw-r--r--src/microhttpd/connection.c10
1 files 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)
1053 (size_t) MHD_MIN ((uint64_t) response->data_buffer_size, 1053 (size_t) MHD_MIN ((uint64_t) response->data_buffer_size,
1054 response->total_size 1054 response->total_size
1055 - connection->response_write_position)); 1055 - connection->response_write_position));
1056 if ( (((ssize_t) MHD_CONTENT_READER_END_OF_STREAM) == ret) || 1056 if ( (MHD_CONTENT_READER_END_OF_STREAM == ret) ||
1057 (((ssize_t) MHD_CONTENT_READER_END_WITH_ERROR) == ret) ) 1057 (MHD_CONTENT_READER_END_WITH_ERROR == ret) )
1058 { 1058 {
1059 /* either error or http 1.0 transfer, close socket! */ 1059 /* either error or http 1.0 transfer, close socket! */
1060 /* TODO: do not update total size, check whether response 1060 /* TODO: do not update total size, check whether response
@@ -1063,7 +1063,7 @@ try_ready_normal_body (struct MHD_Connection *connection)
1063#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) 1063#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS)
1064 MHD_mutex_unlock_chk_ (&response->mutex); 1064 MHD_mutex_unlock_chk_ (&response->mutex);
1065#endif 1065#endif
1066 if ( ((ssize_t) MHD_CONTENT_READER_END_OF_STREAM) == ret) 1066 if (MHD_CONTENT_READER_END_OF_STREAM == ret)
1067 MHD_connection_close_ (connection, 1067 MHD_connection_close_ (connection,
1068 MHD_REQUEST_TERMINATED_COMPLETED_OK); 1068 MHD_REQUEST_TERMINATED_COMPLETED_OK);
1069 else 1069 else
@@ -1192,7 +1192,7 @@ try_ready_chunked_body (struct MHD_Connection *connection,
1192 &connection->write_buffer[max_chunk_hdr_len], 1192 &connection->write_buffer[max_chunk_hdr_len],
1193 size_to_fill); 1193 size_to_fill);
1194 } 1194 }
1195 if ( ((ssize_t) MHD_CONTENT_READER_END_WITH_ERROR) == ret) 1195 if (MHD_CONTENT_READER_END_WITH_ERROR == ret)
1196 { 1196 {
1197 /* error, close socket! */ 1197 /* error, close socket! */
1198 /* TODO: remove update of the response size */ 1198 /* TODO: remove update of the response size */
@@ -1205,7 +1205,7 @@ try_ready_chunked_body (struct MHD_Connection *connection,
1205 "Closing connection (application error generating response).")); 1205 "Closing connection (application error generating response)."));
1206 return MHD_NO; 1206 return MHD_NO;
1207 } 1207 }
1208 if (((ssize_t) MHD_CONTENT_READER_END_OF_STREAM) == ret) 1208 if (MHD_CONTENT_READER_END_OF_STREAM == ret)
1209 { 1209 {
1210 *p_finished = true; 1210 *p_finished = true;
1211 /* TODO: remove update of the response size */ 1211 /* TODO: remove update of the response size */