Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/bind9/isc
File: assertions.h
/*
[0] Fix | Delete
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
[1] Fix | Delete
*
[2] Fix | Delete
* This Source Code Form is subject to the terms of the Mozilla Public
[3] Fix | Delete
* License, v. 2.0. If a copy of the MPL was not distributed with this
[4] Fix | Delete
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
[5] Fix | Delete
*
[6] Fix | Delete
* See the COPYRIGHT file distributed with this work for additional
[7] Fix | Delete
* information regarding copyright ownership.
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
/*! \file isc/assertions.h
[11] Fix | Delete
*/
[12] Fix | Delete
[13] Fix | Delete
#ifndef ISC_ASSERTIONS_H
[14] Fix | Delete
#define ISC_ASSERTIONS_H 1
[15] Fix | Delete
[16] Fix | Delete
#include <isc/lang.h>
[17] Fix | Delete
#include <isc/likely.h>
[18] Fix | Delete
#include <isc/platform.h>
[19] Fix | Delete
[20] Fix | Delete
ISC_LANG_BEGINDECLS
[21] Fix | Delete
[22] Fix | Delete
/*% isc assertion type */
[23] Fix | Delete
typedef enum {
[24] Fix | Delete
isc_assertiontype_require,
[25] Fix | Delete
isc_assertiontype_ensure,
[26] Fix | Delete
isc_assertiontype_insist,
[27] Fix | Delete
isc_assertiontype_invariant
[28] Fix | Delete
} isc_assertiontype_t;
[29] Fix | Delete
[30] Fix | Delete
typedef void (*isc_assertioncallback_t)(const char *, int, isc_assertiontype_t,
[31] Fix | Delete
const char *);
[32] Fix | Delete
[33] Fix | Delete
/* coverity[+kill] */
[34] Fix | Delete
ISC_PLATFORM_NORETURN_PRE
[35] Fix | Delete
void isc_assertion_failed(const char *, int, isc_assertiontype_t,
[36] Fix | Delete
const char *) ISC_PLATFORM_NORETURN_POST;
[37] Fix | Delete
[38] Fix | Delete
void
[39] Fix | Delete
isc_assertion_setcallback(isc_assertioncallback_t);
[40] Fix | Delete
[41] Fix | Delete
const char *
[42] Fix | Delete
isc_assertion_typetotext(isc_assertiontype_t type);
[43] Fix | Delete
[44] Fix | Delete
#if defined(ISC_CHECK_ALL) || defined(__COVERITY__)
[45] Fix | Delete
#define ISC_CHECK_REQUIRE 1
[46] Fix | Delete
#define ISC_CHECK_ENSURE 1
[47] Fix | Delete
#define ISC_CHECK_INSIST 1
[48] Fix | Delete
#define ISC_CHECK_INVARIANT 1
[49] Fix | Delete
#endif
[50] Fix | Delete
[51] Fix | Delete
#if defined(ISC_CHECK_NONE) && !defined(__COVERITY__)
[52] Fix | Delete
#define ISC_CHECK_REQUIRE 0
[53] Fix | Delete
#define ISC_CHECK_ENSURE 0
[54] Fix | Delete
#define ISC_CHECK_INSIST 0
[55] Fix | Delete
#define ISC_CHECK_INVARIANT 0
[56] Fix | Delete
#endif
[57] Fix | Delete
[58] Fix | Delete
#ifndef ISC_CHECK_REQUIRE
[59] Fix | Delete
#define ISC_CHECK_REQUIRE 1
[60] Fix | Delete
#endif
[61] Fix | Delete
[62] Fix | Delete
#ifndef ISC_CHECK_ENSURE
[63] Fix | Delete
#define ISC_CHECK_ENSURE 1
[64] Fix | Delete
#endif
[65] Fix | Delete
[66] Fix | Delete
#ifndef ISC_CHECK_INSIST
[67] Fix | Delete
#define ISC_CHECK_INSIST 1
[68] Fix | Delete
#endif
[69] Fix | Delete
[70] Fix | Delete
#ifndef ISC_CHECK_INVARIANT
[71] Fix | Delete
#define ISC_CHECK_INVARIANT 1
[72] Fix | Delete
#endif
[73] Fix | Delete
[74] Fix | Delete
#if ISC_CHECK_REQUIRE != 0
[75] Fix | Delete
#define ISC_REQUIRE(cond) \
[76] Fix | Delete
((void) (ISC_LIKELY(cond) || \
[77] Fix | Delete
((isc_assertion_failed)(__FILE__, __LINE__, \
[78] Fix | Delete
isc_assertiontype_require, \
[79] Fix | Delete
#cond), 0)))
[80] Fix | Delete
#else
[81] Fix | Delete
#define ISC_REQUIRE(cond) ((void) ISC_LIKELY(cond))
[82] Fix | Delete
#endif /* ISC_CHECK_REQUIRE */
[83] Fix | Delete
[84] Fix | Delete
#if ISC_CHECK_ENSURE != 0
[85] Fix | Delete
#define ISC_ENSURE(cond) \
[86] Fix | Delete
((void) (ISC_LIKELY(cond) || \
[87] Fix | Delete
((isc_assertion_failed)(__FILE__, __LINE__, \
[88] Fix | Delete
isc_assertiontype_ensure, \
[89] Fix | Delete
#cond), 0)))
[90] Fix | Delete
#else
[91] Fix | Delete
#define ISC_ENSURE(cond) ((void) ISC_LIKELY(cond))
[92] Fix | Delete
#endif /* ISC_CHECK_ENSURE */
[93] Fix | Delete
[94] Fix | Delete
#if ISC_CHECK_INSIST != 0
[95] Fix | Delete
#define ISC_INSIST(cond) \
[96] Fix | Delete
((void) (ISC_LIKELY(cond) || \
[97] Fix | Delete
((isc_assertion_failed)(__FILE__, __LINE__, \
[98] Fix | Delete
isc_assertiontype_insist, \
[99] Fix | Delete
#cond), 0)))
[100] Fix | Delete
#else
[101] Fix | Delete
#define ISC_INSIST(cond) ((void) ISC_LIKELY(cond))
[102] Fix | Delete
#endif /* ISC_CHECK_INSIST */
[103] Fix | Delete
[104] Fix | Delete
#if ISC_CHECK_INVARIANT != 0
[105] Fix | Delete
#define ISC_INVARIANT(cond) \
[106] Fix | Delete
((void) (ISC_LIKELY(cond) || \
[107] Fix | Delete
((isc_assertion_failed)(__FILE__, __LINE__, \
[108] Fix | Delete
isc_assertiontype_invariant, \
[109] Fix | Delete
#cond), 0)))
[110] Fix | Delete
#else
[111] Fix | Delete
#define ISC_INVARIANT(cond) ((void) ISC_LIKELY(cond))
[112] Fix | Delete
#endif /* ISC_CHECK_INVARIANT */
[113] Fix | Delete
[114] Fix | Delete
ISC_LANG_ENDDECLS
[115] Fix | Delete
[116] Fix | Delete
#endif /* ISC_ASSERTIONS_H */
[117] Fix | Delete
[118] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function