From 87bf69bb4d3da6f534dfbf9cd4c586060f4798bb Mon Sep 17 00:00:00 2001 From: Rui Guo Date: Sat, 6 Jun 2009 15:48:04 +0800 Subject: [PATCH] Correct the vararg related definition. --- src/script.c | 2 ++ src/script.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/script.c b/src/script.c index 1b9a728..1ff127b 100644 --- a/src/script.c +++ b/src/script.c @@ -219,7 +219,9 @@ trigger_sevent(struct script_event *ev, VA_DOTS) params = ev->params; while (chain) { + VA_START(va, ev); res = chain->dispatcher(chain->handler, params, va); + VA_END(va); if (res) break; } diff --git a/src/script.h b/src/script.h index 6b990de..2a23e83 100644 --- a/src/script.h +++ b/src/script.h @@ -60,7 +60,7 @@ struct listener * The return value is significant: * a non-zero value will stop further * notification to the rest of the chain.*/ - int (*dispatcher) __P((void *handler, char *params, VA_DOTS)); + int (*dispatcher) __P((void *handler, char *params, va_list va)); /* smaller means higher privilege.*/ int priv; -- 2.11.4.GIT