summaryrefslogtreecommitdiff
path: root/lib/msg.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/msg.h')
-rw-r--r--lib/msg.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/msg.h b/lib/msg.h
index cfabc7f..d70798c 100644
--- a/lib/msg.h
+++ b/lib/msg.h
@@ -110,21 +110,23 @@ message (int severity, const char * fname, const char * fmt, ...)
#undef PROGNAME_MAXLEN
#endif
+#ifdef INCLUDE_DEBUG_MSGS
inline static void
debug_message (const char * s, const char * fname)
{
-#ifdef INCLUDE_DEBUG_MSGS
message (L_DEBUG, fname, "%s", s);
-#endif
}
+#else
+#define debug_message(x, y) /* nothing */
+#endif
+
+#ifdef INCLUDE_DEBUG_MSGS
static void
debug(const char * s, ...) __attribute__((format(printf, 1, 2)));
-
inline static void
debug(const char * s, ...)
{
-#ifdef INCLUDE_DEBUG_MSGS
if (do_msg(L_DEBUG)) {
va_list va;
va_start(va, s);
@@ -133,8 +135,10 @@ debug(const char * s, ...)
fprintf(stderr, "\n");
va_end(va);
}
-#endif
}
+#else
+#define debug(s, ...) /* nothing */
+#endif
inline static void
errno_msg(int severity, char const * fname)