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@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
b286cb8eac
commit
6b88864310
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue