[openssl-commits] [openssl] master update
Rich Salz
rsalz at openssl.org
Sat Apr 2 20:56:17 UTC 2016
The branch master has been updated
via 6b888643105e37d340d509b98023b4779653c8a7 (commit)
from b286cb8eac308b2f2350d01b8b0ccb63909a2e47 (commit)
- Log -----------------------------------------------------------------
commit 6b888643105e37d340d509b98023b4779653c8a7
Author: Mat <mberchtold at gmail.com>
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 <matt at openssl.org>
Reviewed-by: Rich Salz <rsalz at openssl.org>
-----------------------------------------------------------------------
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
More information about the openssl-commits
mailing list