gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 01/02: Muted compiler warnings


From: gnunet
Subject: [libmicrohttpd] 01/02: Muted compiler warnings
Date: Sun, 27 Dec 2020 16:02:41 +0100

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit f53db2892e5af9841b0b19e6a5fea96fb2f8ebf8
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Dec 27 17:35:49 2020 +0300

    Muted compiler warnings
---
 doc/examples/tlsauthentication.c          | 2 +-
 src/examples/websocket_threaded_example.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/examples/tlsauthentication.c b/doc/examples/tlsauthentication.c
index ca8187bc..5b2dec1d 100644
--- a/doc/examples/tlsauthentication.c
+++ b/doc/examples/tlsauthentication.c
@@ -54,7 +54,7 @@ string_to_base64 (const char *message)
   }
 
   if (length % 3)
-    strncat (tmp, "===", 3 - length % 3);
+    strncat (tmp, "==", 3 - length % 3);
 
   return tmp;
 }
diff --git a/src/examples/websocket_threaded_example.c 
b/src/examples/websocket_threaded_example.c
index 1f4db5b8..4c767f0a 100644
--- a/src/examples/websocket_threaded_example.c
+++ b/src/examples/websocket_threaded_example.c
@@ -482,7 +482,7 @@ ws_get_accept_value (const char *key, char **val)
   char *str;
   ssize_t len;
 
-  if (NULL == key)
+  if ( (NULL == key) || (WS_KEY_LEN != strlen (key)))
   {
     return MHD_NO;
   }
@@ -535,7 +535,7 @@ send_all (MHD_socket sock, const unsigned char *buf, size_t 
len)
 
   for (off = 0; off < len; off += ret)
   {
-    ret = send (sock, (const void*)&buf[off], len - off, 0);
+    ret = send (sock, (const void*) &buf[off], len - off, 0);
     if (0 > ret)
     {
       if (EAGAIN == errno)
@@ -711,7 +711,7 @@ run_usock (void *cls)
     }
     if (type == WS_OPCODE_TEXT_FRAME)
     {
-      size = sprintf (client, "User#%d: ", (int)ws->sock);
+      size = sprintf (client, "User#%d: ", (int) ws->sock);
       size += got;
       text = malloc (size);
       if (NULL != text)

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