Skip to content

Commit 495a590

Browse files
committed
Make variable / func static. Add prototype.
1 parent 5d2eb83 commit 495a590

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/simple_http.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
#include <cyassl/ctaocrypt/error-crypt.h>
4545
#endif
4646

47+
#ifdef USE_CYASSL
48+
static CYASSL_CTX *get_cyassl_ctx(void);
49+
#endif
50+
51+
4752
int
4853
http_get(const int sockfd, char *buf) {
4954

@@ -120,8 +125,8 @@ http_get(const int sockfd, char *buf) {
120125

121126
#ifdef USE_CYASSL
122127

123-
CYASSL_CTX *cyassl_ctx = NULL;
124-
pthread_mutex_t cyassl_ctx_mutex = PTHREAD_MUTEX_INITIALIZER;
128+
static CYASSL_CTX *cyassl_ctx = NULL;
129+
static pthread_mutex_t cyassl_ctx_mutex = PTHREAD_MUTEX_INITIALIZER;
125130

126131
#define LOCK_CYASSL_CTX() do { \
127132
debug(LOG_DEBUG, "Locking CyaSSL Context"); \
@@ -136,7 +141,7 @@ pthread_mutex_t cyassl_ctx_mutex = PTHREAD_MUTEX_INITIALIZER;
136141
} while (0)
137142

138143

139-
CYASSL_CTX *
144+
static CYASSL_CTX *
140145
get_cyassl_ctx(void)
141146
{
142147
CYASSL_CTX *ret;

0 commit comments

Comments
 (0)