diff options
Diffstat (limited to 'usr.bin/dig/lib/isc')
| -rw-r--r-- | usr.bin/dig/lib/isc/assertions.c | 3 | ||||
| -rw-r--r-- | usr.bin/dig/lib/isc/include/isc/assertions.h | 52 |
2 files changed, 2 insertions, 53 deletions
diff --git a/usr.bin/dig/lib/isc/assertions.c b/usr.bin/dig/lib/isc/assertions.c index 5ef8fa32e68..f0d10654b8b 100644 --- a/usr.bin/dig/lib/isc/assertions.c +++ b/usr.bin/dig/lib/isc/assertions.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: assertions.c,v 1.3 2020/02/12 13:05:04 jsg Exp $ */ +/* $Id: assertions.c,v 1.4 2020/02/13 08:15:31 florian Exp $ */ /*! \file */ @@ -38,7 +38,6 @@ static isc_assertioncallback_t isc_assertion_failed_cb = default_callback; */ /*% assertion failed handler */ -/* coverity[+kill] */ void isc_assertion_failed(const char *file, int line, isc_assertiontype_t type, const char *cond) diff --git a/usr.bin/dig/lib/isc/include/isc/assertions.h b/usr.bin/dig/lib/isc/include/isc/assertions.h index 23dc094b718..5db9a0b14d7 100644 --- a/usr.bin/dig/lib/isc/include/isc/assertions.h +++ b/usr.bin/dig/lib/isc/include/isc/assertions.h @@ -15,7 +15,7 @@ */ /* - * $Id: assertions.h,v 1.2 2020/02/12 13:05:04 jsg Exp $ + * $Id: assertions.h,v 1.3 2020/02/13 08:15:31 florian Exp $ */ /*! \file isc/assertions.h */ @@ -42,83 +42,33 @@ typedef enum { typedef void (*isc_assertioncallback_t)(const char *, int, isc_assertiontype_t, const char *); -/* coverity[+kill] */ __dead void isc_assertion_failed(const char *, int, isc_assertiontype_t, const char *); const char * isc_assertion_typetotext(isc_assertiontype_t type); -#if defined(ISC_CHECK_ALL) || defined(__COVERITY__) -#define ISC_CHECK_REQUIRE 1 -#define ISC_CHECK_ENSURE 1 -#define ISC_CHECK_INSIST 1 -#define ISC_CHECK_INVARIANT 1 -#endif - -#if defined(ISC_CHECK_NONE) && !defined(__COVERITY__) -#define ISC_CHECK_REQUIRE 0 -#define ISC_CHECK_ENSURE 0 -#define ISC_CHECK_INSIST 0 -#define ISC_CHECK_INVARIANT 0 -#endif - -#ifndef ISC_CHECK_REQUIRE -#define ISC_CHECK_REQUIRE 1 -#endif - -#ifndef ISC_CHECK_ENSURE -#define ISC_CHECK_ENSURE 1 -#endif - -#ifndef ISC_CHECK_INSIST -#define ISC_CHECK_INSIST 1 -#endif - -#ifndef ISC_CHECK_INVARIANT -#define ISC_CHECK_INVARIANT 1 -#endif - -#if ISC_CHECK_REQUIRE != 0 #define ISC_REQUIRE(cond) \ ((void) ((cond) || \ ((isc_assertion_failed)(__FILE__, __LINE__, \ isc_assertiontype_require, \ #cond), 0))) -#else -#define ISC_REQUIRE(cond) ((void) 0) -#endif /* ISC_CHECK_REQUIRE */ - -#if ISC_CHECK_ENSURE != 0 #define ISC_ENSURE(cond) \ ((void) ((cond) || \ ((isc_assertion_failed)(__FILE__, __LINE__, \ isc_assertiontype_ensure, \ #cond), 0))) -#else -#define ISC_ENSURE(cond) ((void) 0) -#endif /* ISC_CHECK_ENSURE */ - -#if ISC_CHECK_INSIST != 0 #define ISC_INSIST(cond) \ ((void) ((cond) || \ ((isc_assertion_failed)(__FILE__, __LINE__, \ isc_assertiontype_insist, \ #cond), 0))) -#else -#define ISC_INSIST(cond) ((void) 0) -#endif /* ISC_CHECK_INSIST */ -#if ISC_CHECK_INVARIANT != 0 #define ISC_INVARIANT(cond) \ ((void) ((cond) || \ ((isc_assertion_failed)(__FILE__, __LINE__, \ isc_assertiontype_invariant, \ #cond), 0))) -#else -#define ISC_INVARIANT(cond) ((void) 0) -#endif /* ISC_CHECK_INVARIANT */ - ISC_LANG_ENDDECLS #endif /* ISC_ASSERTIONS_H */ |
