summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-10-15 10:48:35 -0400
committerNick Mathewson <nickm@torproject.org>2018-10-15 10:48:35 -0400
commit23ce9a60fbd93481f855c30e3e550acefc6052a4 (patch)
treea72d1f846e086d052fd455ffa1c135aad578d03c /src/lib
parent4983322cc71d56d3b9225704b85a7c4a933a40a1 (diff)
parent3462f8ed6430bdb1528a7b63aaf2281489eb04d1 (diff)
downloadtor-23ce9a60fbd93481f855c30e3e550acefc6052a4.tar.gz
tor-23ce9a60fbd93481f855c30e3e550acefc6052a4.zip
Merge branch 'maint-0.3.4'
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/log/util_bug.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/log/util_bug.h b/src/lib/log/util_bug.h
index 0786b05d77..964bc66840 100644
--- a/src/lib/log/util_bug.h
+++ b/src/lib/log/util_bug.h
@@ -103,7 +103,12 @@
} STMT_END
#endif /* defined(TOR_UNIT_TESTS) && defined(DISABLE_ASSERTS_IN_UNIT_TESTS) */
-#define tor_assert_unreached() tor_assert(0)
+#define tor_assert_unreached() \
+ STMT_BEGIN { \
+ tor_assertion_failed_(SHORT_FILE__, __LINE__, __func__, \
+ "line should be unreached"); \
+ abort(); \
+ } STMT_END
/* Non-fatal bug assertions. The "unreached" variants mean "this line should
* never be reached." The "once" variants mean "Don't log a warning more than