[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Treat absent argument to crypto_log_errors as a bug.
commit 98a590577a1064e2d0134a291c76a62fe6469a3c
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Tue May 3 14:16:14 2016 -0400
Treat absent argument to crypto_log_errors as a bug.
---
src/common/crypto.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 71cab24..24a9590 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -171,13 +171,9 @@ crypto_log_errors(int severity, const char *doing)
if (!msg) msg = "(null)";
if (!lib) lib = "(null)";
if (!func) func = "(null)";
- if (doing) {
- tor_log(severity, LD_CRYPTO, "crypto error while %s: %s (in %s:%s)",
+ if (BUG(!doing)) doing = "(null)";
+ tor_log(severity, LD_CRYPTO, "crypto error while %s: %s (in %s:%s)",
doing, msg, lib, func);
- } else {
- tor_log(severity, LD_CRYPTO, "crypto error: %s (in %s:%s)",
- msg, lib, func);
- }
}
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits