libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 57cc8b71135a2d79240bf7edc678697a7192d208
parent df5b770e2123aa6edca8b6a9083723630a987072
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Mon, 18 Apr 2022 13:09:54 +0300

Fixed missing 'const' qualifiers

Diffstat:
Msrc/microhttpd/daemon.c | 6+++---
Msrc/microhttpd/mhd_str.c | 2+-
Msrc/microhttpd/response.c | 2+-
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -6743,7 +6743,7 @@ MHD_start_daemon_va (unsigned int flags, if (0 > setsockopt (listen_fd, SOL_SOCKET, SO_REUSEADDR, - (void *) &on, sizeof (on))) + (const void *) &on, sizeof (on))) { #ifdef HAVE_MESSAGES MHD_DLOG (daemon, @@ -6762,7 +6762,7 @@ MHD_start_daemon_va (unsigned int flags, if (0 > setsockopt (listen_fd, SOL_SOCKET, SO_REUSEADDR, - (void *) &on, sizeof (on))) + (const void *) &on, sizeof (on))) { #ifdef HAVE_MESSAGES MHD_DLOG (daemon, @@ -6784,7 +6784,7 @@ MHD_start_daemon_va (unsigned int flags, #else /* MHD_WINSOCK_SOCKETS */ SO_REUSEADDR, #endif /* MHD_WINSOCK_SOCKETS */ - (void *) &on, + (const void *) &on, sizeof (on))) { #ifdef HAVE_MESSAGES diff --git a/src/microhttpd/mhd_str.c b/src/microhttpd/mhd_str.c @@ -1366,7 +1366,7 @@ MHD_bin_to_hex (const void *bin, for (i = 0; i < size; ++i) { uint8_t j; - const uint8_t b = ((uint8_t *) bin)[i]; + const uint8_t b = ((const uint8_t *) bin)[i]; j = b >> 4; hex[i * 2] = (char) ((j < 10) ? (j + '0') : (j - 10 + 'a')); j = b & 0x0f; diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c @@ -1594,7 +1594,7 @@ MHD_create_response_from_iovec (const struct MHD_IoVec *iov, if (1 == i_cp) { mhd_assert (NULL != last_valid_buffer); - response->data = (void *) last_valid_buffer; + response->data = last_valid_buffer; response->data_size = (size_t) total_size; return response; }