gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 08/14: Fixed missing 'const' qualifiers


From: gnunet
Subject: [libmicrohttpd] 08/14: Fixed missing 'const' qualifiers
Date: Tue, 19 Apr 2022 19:31:15 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

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

    Fixed missing 'const' qualifiers
---
 src/microhttpd/daemon.c   | 6 +++---
 src/microhttpd/mhd_str.c  | 2 +-
 src/microhttpd/response.c | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 66f852d6..c2f4b2c7 100644
--- 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
index 08781cb9..fdbed4f8 100644
--- 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
index ef04f584..bf1d9c31 100644
--- 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;
   }

-- 
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]