From e1989aea086a6cacf0efbc2e5d046843ce9a53ef Mon Sep 17 00:00:00 2001 From: Krzysztof Jackiewicz Date: Wed, 1 Jun 2016 17:01:08 +0200 Subject: [PATCH] Don't clear errors after error strings initialization Change-Id: Idc58cbd7e83916ba5298d366a8be1bffbe2761c2 --- src/debug.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/debug.c b/src/debug.c index ac7fe9a..13c0a9b 100644 --- a/src/debug.c +++ b/src/debug.c @@ -87,13 +87,12 @@ void error_dump(const char *file, int line, const char *function, int code) while ((err = ERR_get_error()) != 0 && written < BUF_SIZE - 1) { if (!error_strings_loaded) { /* - * Both these functions are thread-safe as long as static locks are - * installed according to doc so calling them twice won't break + * This function is thread-safe as long as static locks are + * installed according to doc so calling it twice won't break * anything and I don't want to use synchronization mechanisms * here. */ ERR_load_crypto_strings(); - ERR_clear_error(); error_strings_loaded = true; } -- 2.7.4