[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 09/11: process_request_body(): minor improvement of code
From: |
gnunet |
Subject: |
[libmicrohttpd] 09/11: process_request_body(): minor improvement of code readability |
Date: |
Wed, 24 Nov 2021 19:08:22 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit f2540786443afdb8e2e6ce7af602f9223ee63515
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Tue Nov 23 15:11:19 2021 +0300
process_request_body(): minor improvement of code readability
---
src/microhttpd/connection.c | 5 +++--
src/microhttpd/internal.h | 7 ++++---
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 2db73b63..badf5749 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -3142,10 +3142,11 @@ process_request_body (struct MHD_Connection *connection)
if (0 == available)
break;
}
- if (connection->current_chunk_offset <
- connection->current_chunk_size)
+ if (0 != connection->current_chunk_size)
{
uint64_t cur_chunk_left;
+ mhd_assert (connection->current_chunk_offset < \
+ connection->current_chunk_size);
/* we are in the middle of a chunk, give
as much as possible to the client (without
crossing chunk boundaries) */
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index da981c80..45c17441 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -1292,9 +1292,10 @@ struct MHD_Connection
/**
* If we are receiving with chunked encoding, where are we right
- * now? Set to 0 if we are waiting to receive the chunk size;
- * otherwise, this is the size of the current chunk. A value of
- * zero is also used when we're at the end of the chunks.
+ * now?
+ * Set to 0 if we are waiting to receive the chunk size;
+ * otherwise, this is the size of the current chunk.
+ * A value of zero is also used when we're at the end of the chunks.
*/
uint64_t current_chunk_size;
--
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, 2021/11/24
- [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 <=
- [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