diff options
author | Rich Salz <rsalz@openssl.org> | 2015-01-24 10:57:19 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-01-24 10:58:38 -0500 |
commit | a2b18e657ea1a932d125154f4e13ab2258796d90 (patch) | |
tree | bdfcb8bbe1d673b3bce209ef289520e11a109464 /crypto/threads | |
parent | 2747d73c1466c487daf64a1234b6fe2e8a62ac75 (diff) | |
download | openssl-a2b18e657ea1a932d125154f4e13ab2258796d90.tar.gz |
ifdef cleanup, part 4a: '#ifdef undef'
This removes all code surrounded by '#ifdef undef'
One case is left: memmove() replaced by open-coded for loop,
in crypto/stack/stack.c That needs further review.
Also removed a couple of instances of /* dead code */ if I saw them
while doing the main removal.
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/threads')
-rw-r--r-- | crypto/threads/mttest.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/crypto/threads/mttest.c b/crypto/threads/mttest.c index 60b0c06417..ea3784c72f 100644 --- a/crypto/threads/mttest.c +++ b/crypto/threads/mttest.c @@ -529,11 +529,6 @@ int doit(char *ctx[4]) return (1); } else { done |= C_DONE; -#ifdef undef - fprintf(stdout, "CLIENT:from server:"); - fwrite(cbuf, 1, i, stdout); - fflush(stdout); -#endif } } } @@ -560,11 +555,6 @@ int doit(char *ctx[4]) } else { s_write = 1; s_w = 1; -#ifdef undef - fprintf(stdout, "SERVER:from client:"); - fwrite(sbuf, 1, i, stdout); - fflush(stdout); -#endif } } else { i = BIO_write(s_bio, "hello from server\n", 18); @@ -602,9 +592,6 @@ int doit(char *ctx[4]) SSL_set_shutdown(c_ssl, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); SSL_set_shutdown(s_ssl, SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN); -#ifdef undef - fprintf(stdout, "DONE\n"); -#endif err: /* * We have to set the BIO's to NULL otherwise they will be free()ed @@ -791,30 +778,10 @@ void thread_cleanup(void) void solaris_locking_callback(int mode, int type, char *file, int line) { -# ifdef undef - fprintf(stderr, "thread=%4d mode=%s lock=%s %s:%d\n", - CRYPTO_thread_id(), - (mode & CRYPTO_LOCK) ? "l" : "u", - (type & CRYPTO_READ) ? "r" : "w", file, line); -# endif - - /*- - if (CRYPTO_LOCK_SSL_CERT == type) - fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", - CRYPTO_thread_id(), - mode,file,line); - */ if (mode & CRYPTO_LOCK) { - /*- - if (mode & CRYPTO_READ) - rw_rdlock(&(lock_cs[type])); - else - rw_wrlock(&(lock_cs[type])); */ - mutex_lock(&(lock_cs[type])); lock_count[type]++; } else { -/* rw_unlock(&(lock_cs[type])); */ mutex_unlock(&(lock_cs[type])); } } @@ -977,18 +944,6 @@ void thread_cleanup(void) void pthreads_locking_callback(int mode, int type, char *file, int line) { -# ifdef undef - fprintf(stderr, "thread=%4d mode=%s lock=%s %s:%d\n", - CRYPTO_thread_id(), - (mode & CRYPTO_LOCK) ? "l" : "u", - (type & CRYPTO_READ) ? "r" : "w", file, line); -# endif -/*- - if (CRYPTO_LOCK_SSL_CERT == type) - fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", - CRYPTO_thread_id(), - mode,file,line); -*/ if (mode & CRYPTO_LOCK) { pthread_mutex_lock(&(lock_cs[type])); lock_count[type]++; |