diff options
author | Brian Smith <brian@briansmith.org> | 2015-12-30 01:02:59 +0300 |
---|---|---|
committer | David Benjamin <davidben@google.com> | 2016-03-03 21:01:43 +0300 |
commit | cf81b540ce938f43308eb37ab2ab6ee726c8f122 (patch) | |
tree | 3200f4cb27a6a46b8bb434ff4f77cf01324d8b0a /crypto/thread_pthread.c | |
parent | 9867b7dca287c8e74a5c48f20eec1cc6bc14d670 (diff) |
Remove call to |fprintf| in |CRYPTO_once|.
The |fprintf| dependency is quite heavyweight for small targets. Also,
using |fprintf| on a closed file dsecriptor is undefined behavior, and
there's no way that this code can know whether |stderr| has already
been closed. So, just don't do it.
Change-Id: I1277733afe0649ae1324d11cac84826a1056e308
Reviewed-on: https://boringssl-review.googlesource.com/6812
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: David Benjamin <davidben@google.com>
Diffstat (limited to 'crypto/thread_pthread.c')
-rw-r--r-- | crypto/thread_pthread.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/crypto/thread_pthread.c b/crypto/thread_pthread.c index 68aaab5b..2a1c9f8a 100644 --- a/crypto/thread_pthread.c +++ b/crypto/thread_pthread.c @@ -17,7 +17,6 @@ #if !defined(OPENSSL_WINDOWS) && !defined(OPENSSL_NO_THREADS) #include <pthread.h> -#include <stdio.h> #include <stdlib.h> #include <string.h> @@ -76,8 +75,6 @@ void CRYPTO_STATIC_MUTEX_unlock(struct CRYPTO_STATIC_MUTEX *lock) { void CRYPTO_once(CRYPTO_once_t *once, void (*init)(void)) { if (pthread_once(once, init) != 0) { - fprintf(stderr, - "pthread_once failed. Did you link against a threading library?\n"); abort(); } } |