aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-02-09 23:59:17 +0000
committerMatt Caswell <matt@openssl.org>2016-02-09 23:59:17 +0000
commit1ffa8a9685e22a5a0ff1b1322df4d1720b05ce4c (patch)
tree38f1227c43903ad3d5c801e826a59fdd94eb4514
parentb7326ea7106955a7a5b8190fb19c982b49b7c821 (diff)
downloadopenssl-1ffa8a9685e22a5a0ff1b1322df4d1720b05ce4c.zip
openssl-1ffa8a9685e22a5a0ff1b1322df4d1720b05ce4c.tar.gz
openssl-1ffa8a9685e22a5a0ff1b1322df4d1720b05ce4c.tar.bz2
Make some global variables static
Make some global variables that are only ever accessed from one file static. Reviewed-by: Rich Salz <rsalz@openssl.org>
-rw-r--r--crypto/init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/init.c b/crypto/init.c
index f23227e..26021d9 100644
--- a/crypto/init.c
+++ b/crypto/init.c
@@ -168,7 +168,7 @@ static void ossl_init_once_run(OPENSSL_INIT_ONCE *once, void (*init)(void))
}
# endif
-DWORD threadstopkey = TLS_OUT_OF_INDEXES;
+static DWORD threadstopkey = TLS_OUT_OF_INDEXES;
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>
-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