Make some global variables static
authorMatt Caswell <matt@openssl.org>
Tue, 9 Feb 2016 23:59:17 +0000 (23:59 +0000)
committerMatt Caswell <matt@openssl.org>
Tue, 9 Feb 2016 23:59:17 +0000 (23:59 +0000)
Make some global variables that are only ever accessed from one file
static.

Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/init.c

index f23227e60a6c97dd998e3e61aad304807539e855..26021d9494f20b95fdf26352d18a454dfc4d025a 100644 (file)
@@ -168,7 +168,7 @@ static void ossl_init_once_run(OPENSSL_INIT_ONCE *once, void (*init)(void))
 }
 # endif
 
 }
 # endif
 
-DWORD threadstopkey = TLS_OUT_OF_INDEXES;
+static DWORD threadstopkey = TLS_OUT_OF_INDEXES;
 
 static int ossl_init_setup_thread_stop(void)
 {
 
 static int ossl_init_setup_thread_stop(void)
 {
@@ -208,7 +208,7 @@ static struct thread_local_inits_st *ossl_init_get_thread_local(int alloc)
 #else /* pthreads */
 # include <pthread.h>
 
 #else /* pthreads */
 # include <pthread.h>
 
-pthread_key_t threadstopkey;
+static pthread_key_t threadstopkey;
 
 typedef pthread_once_t OPENSSL_INIT_ONCE;
 # define OPENSSL_INIT_ONCE_STATIC_INIT          PTHREAD_ONCE_INIT
 
 typedef pthread_once_t OPENSSL_INIT_ONCE;
 # define OPENSSL_INIT_ONCE_STATIC_INIT          PTHREAD_ONCE_INIT