Commit 6b888643 authored by Mat's avatar Mat Committed by Rich Salz
Browse files

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: default avatarMatt Caswell <matt@openssl.org>
Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent b286cb8e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 0;
}

# endif