diff options
| author | 2020-02-13 08:15:31 +0000 | |
|---|---|---|
| committer | 2020-02-13 08:15:31 +0000 | |
| commit | bdd5abfe143ea10572b424af4dc802c404f44b2f (patch) | |
| tree | 5fccf5d1ddb70b2aadcc246617904232c70e6137 /usr.bin/dig/lib/isc/include | |
| parent | remove some files containing only comments (diff) | |
| download | wireguard-openbsd-bdd5abfe143ea10572b424af4dc802c404f44b2f.tar.xz wireguard-openbsd-bdd5abfe143ea10572b424af4dc802c404f44b2f.zip | |
unfidef assertions.h to always have assertions enabled; no change
in behaviour.
While here unifdef one remaining __COVERITY__.
While we might want to move away from assertions we can't just nuke
them since they are used for error checking.
Diffstat (limited to 'usr.bin/dig/lib/isc/include')
| -rw-r--r-- | usr.bin/dig/lib/isc/include/isc/assertions.h | 52 |
1 files changed, 1 insertions, 51 deletions
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 */ |
