summaryrefslogtreecommitdiff
path: root/threadproc
diff options
context:
space:
mode:
authorivan <ivan@13f79535-47bb-0310-9956-ffa450edef68>2022-06-21 09:54:45 +0000
committerivan <ivan@13f79535-47bb-0310-9956-ffa450edef68>2022-06-21 09:54:45 +0000
commit6b48061bf42bbcb721752c43d142a38264533bbb (patch)
treebddda3ece4360f10ccd4c7746a4ebecffb78c3d0 /threadproc
parent70439c76d0d39a5454d225574f888940c8064a9a (diff)
downloadlibapr-6b48061bf42bbcb721752c43d142a38264533bbb.tar.gz
win32: Fix spurious apr_thread_once() failures.
* threadproc/win32/thread.c (apr_thread_once): Pass NULL as lpContext argument in call to InitOnceExecuteOnce(). According to documentation pointer stored in lpContext should be DWORD aligned. We do not use lpContext argument and lpContext is optional, so just use NULL. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902129 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'threadproc')
-rw-r--r--threadproc/win32/thread.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/threadproc/win32/thread.c b/threadproc/win32/thread.c
index 34cf4851b..4e2c36ead 100644
--- a/threadproc/win32/thread.c
+++ b/threadproc/win32/thread.c
@@ -371,10 +371,8 @@ static BOOL WINAPI init_once_callback(PINIT_ONCE InitOnce,
APR_DECLARE(apr_status_t) apr_thread_once(apr_thread_once_t *control,
void (*func)(void))
{
- PVOID lpContext;
-
if (!InitOnceExecuteOnce(&control->once, init_once_callback, func,
- &lpContext)) {
+ NULL)) {
return apr_get_os_error();
}