From ab01622553553e2ff90dc854f86337c603edc3e4 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 20 May 2021 08:46:42 +0200 Subject: [PATCH] mxshadowsrv: Declare statics as static Declare statics as static to avoind symbol namespace pollution and allow more compiler optimizations. --- mxshadowsrv.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mxshadowsrv.c b/mxshadowsrv.c index fc5044c..9d1b423 100644 --- a/mxshadowsrv.c +++ b/mxshadowsrv.c @@ -69,11 +69,11 @@ static void unmap_shadow(char *shadow_buf, struct stat *statbuf) { #define MAX_THREADS 8 #define TIMEOUT 30000 // client timeout in msec -pthread_mutex_t shadow_mutex = PTHREAD_MUTEX_INITIALIZER ; -char *shadow_buf = NULL; // protected by shadow_mutex -struct stat statbuf; // protected by shadow_mutex -SSL_CTX *ssl_ctx; -sem_t free_worker; +static pthread_mutex_t shadow_mutex = PTHREAD_MUTEX_INITIALIZER ; +static char *shadow_buf = NULL; // protected by shadow_mutex +static struct stat statbuf; // protected by shadow_mutex +static SSL_CTX *ssl_ctx; +static sem_t free_worker; #ifdef DEBUG_MAX_CONNECTS static int debug_remaining_connects = DEBUG_MAX_CONNECTS; #endif