The branch master has been updated
via 6b888643105e37d340d509b98023b4779653c8a7 (commit)
from b286cb8eac308b2f2350d01b8b0ccb63909a2e47 (commit)
- Log -----------------------------------------------------------------
commit 6b888643105e37d340d509b98023b4779653c8a7
Author: Mat <[email protected]>
Date: Fri Apr 1 02:00:03 2016 +0200
Fix: CRYPTO_THREAD_run_once
InitOnceExecuteOnce returns nonzero on success:
MSDN: "If the function succeeds, the return value is nonzero."
So return 1 if it is nonzero, 0 others.
Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Rich Salz <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
crypto/threads_win.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/threads_win.c b/crypto/threads_win.c
index 5a14872..63647a3 100644
--- a/crypto/threads_win.c
+++ b/crypto/threads_win.c
@@ -136,9 +136,9 @@ BOOL CALLBACK once_cb(PINIT_ONCE once, PVOID p, PVOID *pp)
int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void))
{
if (InitOnceExecuteOnce(once, once_cb, init, NULL))
- return 0;
+ return 1;
- return 1;
+ return 0;
}
# endif
_____
openssl-commits mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits