From: Alessandro Ghedini Date: Tue, 8 Mar 2016 21:58:17 +0000 (+0000) Subject: Move variable declaration to the start of the function X-Git-Tag: OpenSSL_1_1_0-pre4~206 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a060574458752ad1f914221be4627598efff62df;p=oweals%2Fopenssl.git Move variable declaration to the start of the function Reviewed-by: Richard Levitte Reviewed-by: Matt Caswell --- diff --git a/crypto/mem_dbg.c b/crypto/mem_dbg.c index 36efed8fba..e69869d0e9 100644 --- a/crypto/mem_dbg.c +++ b/crypto/mem_dbg.c @@ -284,11 +284,12 @@ int CRYPTO_mem_ctrl(int mode) static int mem_check_on(void) { int ret = 0; + CRYPTO_THREAD_ID cur; if (mh_mode & CRYPTO_MEM_CHECK_ON) { CRYPTO_THREAD_run_once(&memdbg_init, do_memdbg_init); - CRYPTO_THREAD_ID cur = CRYPTO_THREAD_get_current_id(); + cur = CRYPTO_THREAD_get_current_id(); CRYPTO_THREAD_read_lock(malloc_lock); ret = (mh_mode & CRYPTO_MEM_CHECK_ENABLE)