summaryrefslogtreecommitdiffhomepage
path: root/netifd.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-09-07 07:47:48 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-09-07 07:47:48 +0200
commit35a4acbb989cabbbbf90e0f720149f2e95c727b5 (patch)
tree5084643a4fe581c50454509f7a2faa1fd5e660ce /netifd.h
parentb8d44d56f67ee86233017b508c3af375df86fae9 (diff)
add DPRINTF type checking for no-debug builds
Diffstat (limited to 'netifd.h')
-rw-r--r--netifd.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/netifd.h b/netifd.h
index 77c8719..1559c50 100644
--- a/netifd.h
+++ b/netifd.h
@@ -16,9 +16,13 @@
#ifdef DEBUG
#define DPRINTF(format, ...) fprintf(stderr, "%s(%d): " format, __func__, __LINE__, ## __VA_ARGS__)
#else
-#define DPRINTF(...) do {} while(0)
+#define DPRINTF(format, ...) no_debug(format, ## __VA_ARGS__)
#endif
+static inline void no_debug(const char *fmt, ...)
+{
+}
+
#define __init __attribute__((constructor))
struct device;