aboutsummaryrefslogtreecommitdiff
path: root/contrib/unbound/util/log.h
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2018-05-12 15:04:05 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2018-05-12 15:04:05 +0000
commit57bddd215c419a01611bca0d1b1d545a64a7e731 (patch)
tree6c6ef88c9bb07275d652d9c1b6d0604268894bd7 /contrib/unbound/util/log.h
parent838e13ceea400eedd6865d8103874a12bc34fd7f (diff)
parent197f1a0fe3e81cde0cd25a3a1f37ebedf9a99488 (diff)
downloadsrc-57bddd215c419a01611bca0d1b1d545a64a7e731.tar.gz
src-57bddd215c419a01611bca0d1b1d545a64a7e731.zip
Upgrade Unbound to 1.7.0. More to follow.
Notes
Notes: svn path=/head/; revision=333567
Diffstat (limited to 'contrib/unbound/util/log.h')
-rw-r--r--contrib/unbound/util/log.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/unbound/util/log.h b/contrib/unbound/util/log.h
index 8e85ee620b18..7bc3d9e76152 100644
--- a/contrib/unbound/util/log.h
+++ b/contrib/unbound/util/log.h
@@ -127,6 +127,9 @@ void log_set_time(time_t* t);
*/
void log_set_time_asc(int use_asc);
+/** get log lock */
+void* log_get_lock(void);
+
/**
* Log informational message.
* Pass printf formatted arguments. No trailing newline is needed.
@@ -186,11 +189,17 @@ void log_vmsg(int pri, const char* type, const char* format, va_list args);
* an assertion that is thrown to the logfile.
*/
#ifdef UNBOUND_DEBUG
+#ifdef __clang_analyzer__
+/* clang analyzer needs to know that log_assert is an assertion, otherwise
+ * it could complain about the nullptr the assert is guarding against. */
+#define log_assert(x) assert(x)
+#else
# define log_assert(x) \
do { if(!(x)) \
fatal_exit("%s:%d: %s: assertion %s failed", \
__FILE__, __LINE__, __func__, #x); \
} while(0);
+#endif
#else
# define log_assert(x) /*nothing*/
#endif