aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/threaded-ssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/threaded-ssl.c')
-rw-r--r--docs/examples/threaded-ssl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/examples/threaded-ssl.c b/docs/examples/threaded-ssl.c
index 6c88d138b..5f1d9b924 100644
--- a/docs/examples/threaded-ssl.c
+++ b/docs/examples/threaded-ssl.c
@@ -51,7 +51,7 @@ static void lock_callback(int mode, int type, char *file, int line)
{
(void)file;
(void)line;
- if (mode & CRYPTO_LOCK) {
+ if(mode & CRYPTO_LOCK) {
pthread_mutex_lock(&(lockarray[type]));
}
else {
@@ -64,7 +64,7 @@ static unsigned long thread_id(void)
unsigned long ret;
ret=(unsigned long)pthread_self();
- return(ret);
+ return ret;
}
static void init_locks(void)
@@ -73,8 +73,8 @@ static void init_locks(void)
lockarray=(pthread_mutex_t *)OPENSSL_malloc(CRYPTO_num_locks() *
sizeof(pthread_mutex_t));
- for (i=0; i<CRYPTO_num_locks(); i++) {
- pthread_mutex_init(&(lockarray[i]),NULL);
+ for(i=0; i<CRYPTO_num_locks(); i++) {
+ pthread_mutex_init(&(lockarray[i]), NULL);
}
CRYPTO_set_id_callback((unsigned long (*)())thread_id);
@@ -86,7 +86,7 @@ static void kill_locks(void)
int i;
CRYPTO_set_locking_callback(NULL);
- for (i=0; i<CRYPTO_num_locks(); i++)
+ for(i=0; i<CRYPTO_num_locks(); i++)
pthread_mutex_destroy(&(lockarray[i]));
OPENSSL_free(lockarray);