summaryrefslogtreecommitdiff
path: root/threadproc
diff options
context:
space:
mode:
authorIvan Zhakov <ivan@apache.org>2022-06-21 09:54:45 +0000
committerIvan Zhakov <ivan@apache.org>2022-06-21 09:54:45 +0000
commit649515906c82157ceba65e094de2c4e907d58fff (patch)
treebddda3ece4360f10ccd4c7746a4ebecffb78c3d0 /threadproc
parentf342ab01def2bd7869de4ce34051d3a8ef221c90 (diff)
downloadapr-649515906c82157ceba65e094de2c4e907d58fff.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();
}