This macro returns true if the specified complaint would be released, false
else. This is useful e.g. to do further actions when releasing a complaint.
/*
* NAME
+ * c_would_release
+ *
+ * DESCRIPTION
+ * Returns true if the specified complaint would be released, false else.
+ */
+#define c_would_release(c) ((c)->interval != 0)
+
+/*
+ * NAME
* c_release
*
* DESCRIPTION
void c_do_release (int level, c_complain_t *c, const char *format, ...);
#define c_release(level, c, ...) \
do { \
- if ((c)->interval != 0) \
+ if (c_would_release (c)) \
c_do_release(level, c, __VA_ARGS__); \
} while (0)