2 Bacula® - The Network Backup Solution
4 Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
6 The main author of Bacula is Kern Sibbald, with contributions from many
7 others, a complete list can be found in the file AUTHORS.
9 You may use this file and others of this release according to the
10 license defined in the LICENSE file, which includes the Affero General
11 Public License, v3.0 ("AGPLv3") and some additional permissions and
12 terms pursuant to its AGPLv3 Section 7.
14 Bacula® is a registered trademark of Kern Sibbald.
17 * Assertion definitions
22 #ifndef _ASSERT_MACRO_H
23 #define _ASSERT_MACRO_H 1
25 /* Assertions definitions */
27 /* check valid pointer if not return */
28 #ifndef ASSERT_NVAL_RET
29 #define ASSERT_NVAL_RET(value) \
35 /* check an error if true return */
36 #ifndef ASSERT_VAL_RET
37 #define ASSERT_VAL_RET(value) \
43 /* check valid pointer with Null return */
44 #ifndef ASSERT_NVAL_RET_NULL
45 #define ASSERT_NVAL_RET_NULL(value) \
52 /* if value then Null return */
53 #ifndef ASSERT_VAL_RET_NULL
54 #define ASSERT_VAL_RET_NULL(value) \
61 /* check valid pointer with int/err return */
62 #ifndef ASSERT_NVAL_RET_ONE
63 #define ASSERT_NVAL_RET_ONE(value) \
70 /* check valid pointer with int/err return */
71 #ifndef ASSERT_NVAL_RET_NONE
72 #define ASSERT_NVAL_RET_NONE(value) \
79 /* check error if not exit with error */
80 #ifndef ASSERT_NVAL_EXIT_ONE
81 #define ASSERT_NVAL_EXIT_ONE(value) \
87 /* check error if not exit with error */
88 #ifndef ASSERT_NVAL_EXIT_E
89 #define ASSERT_NVAL_EXIT_E(value,ev) \
95 /* check error if not return zero */
96 #ifndef ASSERT_NVAL_RET_ZERO
97 #define ASSERT_NVAL_RET_ZERO(value) \
103 /* check error if not return value */
104 #ifndef ASSERT_NVAL_RET_V
105 #define ASSERT_NVAL_RET_V(value,rv) \
111 /* checks error value then int/err return */
112 #ifndef ASSERT_VAL_RET_ONE
113 #define ASSERT_VAL_RET_ONE(value) \
120 /* checks error value then int/err return */
121 #ifndef ASSERT_VAL_RET_NONE
122 #define ASSERT_VAL_RET_NONE(value) \
129 /* checks error value then exit one */
130 #ifndef ASSERT_VAL_EXIT_ONE
131 #define ASSERT_VAL_EXIT_ONE(value) \
138 /* check error if not return zero */
139 #ifndef ASSERT_VAL_RET_ZERO
140 #define ASSERT_VAL_RET_ZERO(value) \
146 /* check error if not return value */
147 #ifndef ASSERT_VAL_RET_V
148 #define ASSERT_VAL_RET_V(value,rv) \
154 #endif /* _ASSERT_MACRO_H */