From 5fba0356bbaf6a248cf2147443ef669a4eb70935 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Fri, 13 Nov 2009 02:30:52 +0100 Subject: [PATCH] debug: make debug hook signature vprintf() compatible Signed-off-by: Patrick McHardy --- include/dect/libdect.h | 2 +- src/libdect.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/dect/libdect.h b/include/dect/libdect.h index d61954f..0fa3c40 100644 --- a/include/dect/libdect.h +++ b/include/dect/libdect.h @@ -132,6 +132,6 @@ extern void dect_close_handle(struct dect_handle *dh); extern int dect_init(struct dect_handle *dh); -extern void dect_set_debug_hook(void (*fn)(const char *fmt, va_list ap)); +extern void dect_set_debug_hook(int (*fn)(const char *fmt, va_list ap)); #endif /* _LIBDECT_DECT_LIBDECT_H */ diff --git a/src/libdect.c b/src/libdect.c index ca33e0d..5933765 100644 --- a/src/libdect.c +++ b/src/libdect.c @@ -18,9 +18,9 @@ #include #include -static void __fmtstring(1, 0) (*debug_hook)(const char *fmt, va_list ap); +static int __fmtstring(1, 0) (*debug_hook)(const char *fmt, va_list ap); -void dect_set_debug_hook(void (*fn)(const char *fmt, va_list ap)) +void dect_set_debug_hook(int (*fn)(const char *fmt, va_list ap)) { debug_hook = fn; }