فهرست منبع

fix clang warnings

Christian Grothoff 9 سال پیش
والد
کامیت
9b7bc3d8bd
3فایلهای تغییر یافته به همراه7 افزوده شده و 3 حذف شده
  1. 4 0
      doc/examples/tlsauthentication.c
  2. 1 0
      src/microhttpd/connection.c
  3. 2 3
      src/microhttpd/daemon.c

+ 4 - 0
doc/examples/tlsauthentication.c

@@ -246,6 +246,10 @@ main ()
   if ((key_pem == NULL) || (cert_pem == NULL))
     {
       printf ("The key/certificate files could not be read.\n");
+      if (NULL != key_pem)
+        free (key_pem);
+      if (NULL != cert_pem)
+        free (cert_pem);
       return 1;
     }
 

+ 1 - 0
src/microhttpd/connection.c

@@ -977,6 +977,7 @@ build_header_response (struct MHD_Connection *connection)
   must_add_chunked_encoding = MHD_NO;
   must_add_keep_alive = MHD_NO;
   must_add_content_length = MHD_NO;
+  response_has_keepalive = NULL;
   switch (connection->state)
     {
     case MHD_CONNECTION_FOOTERS_RECEIVED:

+ 2 - 3
src/microhttpd/daemon.c

@@ -3584,9 +3584,8 @@ MHD_epoll (struct MHD_Daemon *daemon,
 
   /* we handle resumes here because we may have ready connections
      that will not be placed into the epoll list immediately. */
-  if ( (MHD_USE_SUSPEND_RESUME == (daemon->options & MHD_USE_SUSPEND_RESUME)) &&
-       (MHD_YES == resume_suspended_connections (daemon)) )
-    may_block = MHD_NO;
+  if (MHD_USE_SUSPEND_RESUME == (daemon->options & MHD_USE_SUSPEND_RESUME))
+    (void) resume_suspended_connections (daemon);
 
   /* process events for connections */
   while (NULL != (pos = daemon->eready_tail))