summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5febd41)
raw | patch | inline | side by side (parent: 5febd41)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 1 Feb 2009 16:36:25 +0000 (17:36 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 1 Feb 2009 22:13:53 +0000 (23:13 +0100) |
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.
else. This is useful e.g. to do further actions when releasing a complaint.
src/utils_complain.h | patch | blob | history |
diff --git a/src/utils_complain.h b/src/utils_complain.h
index b51a81c677a10d8777ca2d22b2ff7503093e0704..09c43750b3979f2bdd7e67a50bd60a298895ca2f 100644 (file)
--- a/src/utils_complain.h
+++ b/src/utils_complain.h
*/
void c_complain_once (int level, c_complain_t *c, const char *format, ...);
+/*
+ * 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
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)