aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarat Dukhan <maratek@google.com>2020-04-07 21:32:19 -0700
committerMarat Dukhan <maratek@google.com>2020-04-07 21:32:19 -0700
commit02b50e65341cc8ded117c4d42ff6d11f8e838cf1 (patch)
treef1fa8e81ec3756e396ccc41ebe5a4f0dc01e5330
parentbe1bd8ed45f30ccdc23e5dcbf3896c1ae85f1ef3 (diff)
downloadpthreadpool-02b50e65341cc8ded117c4d42ff6d11f8e838cf1.tar.gz
Minor fixes in Windows implementation
-rw-r--r--src/windows.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/windows.c b/src/windows.c
index 0139441..17bcf6e 100644
--- a/src/windows.c
+++ b/src/windows.c
@@ -1,6 +1,5 @@
/* Standard C headers */
#include <assert.h>
-#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
@@ -352,7 +351,7 @@ void pthreadpool_destroy(struct pthreadpool* threadpool) {
const BOOL close_status = CloseHandle(threadpool->command_event[i]);
assert(close_status != FALSE);
}
- if (threadpool->completion_event != NULL) {
+ if (threadpool->completion_event[i] != NULL) {
const BOOL close_status = CloseHandle(threadpool->completion_event[i]);
assert(close_status != FALSE);
}