From 6b888643105e37d340d509b98023b4779653c8a7 Mon Sep 17 00:00:00 2001 From: Mat Date: Fri, 1 Apr 2016 02:00:03 +0200 Subject: [PATCH] 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 Reviewed-by: Rich Salz --- 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 5a14872d1c..63647a39a6 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 -- 2.25.1