Skip to content

Commit

Permalink
mxshadowsrv: Declare statics as static
Browse files Browse the repository at this point in the history
Declare statics as static to avoind symbol namespace pollution and allow
more compiler optimizations.
  • Loading branch information
donald committed May 20, 2021
1 parent 93815ec commit ab01622
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mxshadowsrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab01622

Please sign in to comment.