gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 03/04: perf_replies: minor improvement for W32 code


From: gnunet
Subject: [libmicrohttpd] 03/04: perf_replies: minor improvement for W32 code
Date: Wed, 06 Sep 2023 16:42:20 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit bf99fa820cef39aef2ca4df09950703d64d46cdb
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Sep 6 17:22:51 2023 +0300

    perf_replies: minor improvement for W32 code
---
 src/tools/mhd_tool_get_cpu_count.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/tools/mhd_tool_get_cpu_count.c 
b/src/tools/mhd_tool_get_cpu_count.c
index bd79c69e..c8b08715 100644
--- a/src/tools/mhd_tool_get_cpu_count.c
+++ b/src/tools/mhd_tool_get_cpu_count.c
@@ -598,7 +598,7 @@ mhd_tool_get_sys_cpu_count_special_api_ (void)
   {
     /* Native W32 */
     HMODULE k32hndl;
-    k32hndl = GetModuleHandleA ("kernel32.dll");
+    k32hndl = LoadLibraryA ("kernel32.dll");
     if (NULL != k32hndl)
     {
       typedef DWORD (WINAPI *GAPC_PTR)(WORD GroupNumber);
@@ -634,6 +634,8 @@ mhd_tool_get_sys_cpu_count_special_api_ (void)
           ret = -1; /* Overflow */
       }
     }
+    if (NULL != k32hndl)
+      FreeLibrary (k32hndl);
   }
   if (0 >= ret)
   {

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