[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 02/11: process_request_body(): replaced 'int' with 'bool
From: |
gnunet |
Subject: |
[libmicrohttpd] 02/11: process_request_body(): replaced 'int' with 'bool' |
Date: |
Wed, 24 Nov 2021 19:08:15 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 71cff2d6a38e7917480a25c1310e57115ae5e5e7
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Nov 22 16:35:48 2021 +0300
process_request_body(): replaced 'int' with 'bool'
---
src/microhttpd/connection.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 442189a4..6b355ba3 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -3077,7 +3077,7 @@ process_request_body (struct MHD_Connection *connection)
{
struct MHD_Daemon *daemon = connection->daemon;
size_t available;
- int instant_retry;
+ bool instant_retry;
char *buffer_head;
if (NULL != connection->response)
@@ -3107,7 +3107,7 @@ process_request_body (struct MHD_Connection *connection)
size_t left_unprocessed;
size_t processed_size;
- instant_retry = MHD_NO;
+ instant_retry = false;
if ( (connection->have_chunked_upload) &&
(MHD_SIZE_UNKNOWN == connection->remaining_upload_size) )
{
@@ -3152,7 +3152,7 @@ process_request_body (struct MHD_Connection *connection)
{ /* cur_chunk_left <= (size_t)available */
to_be_processed = (size_t) cur_chunk_left;
if (available > to_be_processed)
- instant_retry = MHD_YES;
+ instant_retry = true;
}
}
else
@@ -3222,7 +3222,7 @@ process_request_body (struct MHD_Connection *connection)
connection->current_chunk_offset = 0;
if (available > 0)
- instant_retry = MHD_YES;
+ instant_retry = true;
if (0LLU == connection->current_chunk_size)
{
connection->remaining_upload_size = 0;
@@ -3279,7 +3279,7 @@ process_request_body (struct MHD_Connection *connection)
);
if (0 != left_unprocessed)
{
- instant_retry = MHD_NO; /* client did not process everything */
+ instant_retry = false; /* client did not process everything */
#ifdef HAVE_MESSAGES
/* client did not process all upload data, complain if
the setup was incorrect, which may prevent us from
@@ -3299,8 +3299,7 @@ process_request_body (struct MHD_Connection *connection)
available -= processed_size;
if (MHD_SIZE_UNKNOWN != connection->remaining_upload_size)
connection->remaining_upload_size -= processed_size;
- }
- while (MHD_NO != instant_retry);
+ } while (instant_retry);
/* TODO: zero out reused memory region */
if ( (available > 0) &&
(buffer_head != connection->read_buffer) )
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] branch master updated (52b79898 -> ad9fc5c6), gnunet, 2021/11/24
- [libmicrohttpd] 03/11: process_request_body(): removed redundant check, gnunet, 2021/11/24
- [libmicrohttpd] 02/11: process_request_body(): replaced 'int' with 'bool',
gnunet <=
- [libmicrohttpd] 04/11: process_request_body(): unify checks for chunked upload, gnunet, 2021/11/24
- [libmicrohttpd] 06/11: process_request_body(): removed one more unneeded check, gnunet, 2021/11/24
- [libmicrohttpd] 07/11: process_request_body(): fixed: do not skip chunk closure when too few data available, gnunet, 2021/11/24
- [libmicrohttpd] 08/11: process_request_body(): do not process when no more data is available, gnunet, 2021/11/24
- [libmicrohttpd] 05/11: process_request_body(): removed unneeded check, gnunet, 2021/11/24
- [libmicrohttpd] 11/11: process_request_body(): added assert, gnunet, 2021/11/24
- [libmicrohttpd] 09/11: process_request_body(): minor improvement of code readability, gnunet, 2021/11/24
- [libmicrohttpd] 10/11: process_request_body(): fixed: removed wrong special handling of the termination chunk, gnunet, 2021/11/24
- [libmicrohttpd] 01/11: test_client_put_stop: use TCP_NODELAY for client, gnunet, 2021/11/24