libmicrohttpd

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

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

Muted compiler warnings

Diffstat:
Mdoc/examples/tlsauthentication.c | 2+-
Msrc/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 @@ -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 @@ -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)