]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Treat absent argument to crypto_log_errors as a bug.
authorNick Mathewson <nickm@torproject.org>
Tue, 3 May 2016 18:16:14 +0000 (14:16 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 16 May 2016 12:26:00 +0000 (08:26 -0400)
src/common/crypto.c

index 71cab24d1d76990db10a03ba7512583c11f8ccc2..24a9590cd696b1d560b1d9d49fb897e65b742393 100644 (file)
@@ -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);
-    }
   }
 }