summaryrefslogtreecommitdiff
path: root/src/common/crypto.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-05-03 14:16:14 -0400
committerNick Mathewson <nickm@torproject.org>2016-05-16 08:26:00 -0400
commit98a590577a1064e2d0134a291c76a62fe6469a3c (patch)
treef15f5dedda0b41026824317b13f76a81b34d116b /src/common/crypto.c
parentd88656ec066f9fe856230f95ff76bf97f31ed46e (diff)
downloadtor-98a590577a1064e2d0134a291c76a62fe6469a3c.tar.gz
tor-98a590577a1064e2d0134a291c76a62fe6469a3c.zip
Treat absent argument to crypto_log_errors as a bug.
Diffstat (limited to 'src/common/crypto.c')
-rw-r--r--src/common/crypto.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 71cab24d1d..24a9590cd6 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);
- }
}
}