gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 01/02: examples: fixed wrong array initialisation


From: gnunet
Subject: [libmicrohttpd] 01/02: examples: fixed wrong array initialisation
Date: Thu, 24 Dec 2020 13:37:00 +0100

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 5c659994bf7fcc8521fe2304dae5f01a5360081a
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu Dec 24 15:27:55 2020 +0300

    examples: fixed wrong array initialisation
---
 src/examples/websocket_threaded_example.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/examples/websocket_threaded_example.c 
b/src/examples/websocket_threaded_example.c
index b6f9cee9..ea12e14b 100644
--- a/src/examples/websocket_threaded_example.c
+++ b/src/examples/websocket_threaded_example.c
@@ -879,6 +879,7 @@ main (int argc, char *const *argv)
 {
   struct MHD_Daemon *d;
   uint16_t port;
+  size_t i;
 
   if (argc != 2)
   {
@@ -891,7 +892,8 @@ main (int argc, char *const *argv)
                         port, NULL, NULL, &ahc_cb, &port, MHD_OPTION_END);
   if (NULL == d)
     return 1;
-  memset (CLIENT_SOCKS, -1, sizeof (CLIENT_SOCKS));
+  for (i = 0; i < sizeof(CLIENT_SOCKS) / sizeof(CLIENT_SOCKS[0]); ++i)
+    CLIENT_SOCKS[i] = MHD_INVALID_SOCKET;
   (void) getc (stdin);
   MHD_stop_daemon (d);
   return 0;

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