]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Change delete_timeouts into a macro.
authorRoy Marples <roy@marples.name>
Mon, 11 Oct 2010 14:53:06 +0000 (14:53 +0000)
committerRoy Marples <roy@marples.name>
Mon, 11 Oct 2010 14:53:06 +0000 (14:53 +0000)
eloop.c
eloop.h

diff --git a/eloop.c b/eloop.c
index f6d5d28289393c87d21080686c896ed52a491d3c..a5d08cb280dce7fb076f9a97c9c660050713f4c7 100644 (file)
--- a/eloop.c
+++ b/eloop.c
@@ -223,16 +223,6 @@ delete_q_timeouts(int queue, void *arg, void (*callback)(void *), ...)
        va_end(va);
 }
 
-void
-delete_timeouts( void *arg, void (*callback)(void *), ...)
-{
-       va_list va;
-
-       va_start(va, callback);
-       v_delete_q_timeouts(0, arg, callback, va);
-       va_end(va);
-}
-
 void
 delete_q_timeout(int queue, void (*callback)(void *), void *arg)
 {
diff --git a/eloop.h b/eloop.h
index 9f9637ac2b4b92b8281f3185166bfaba09c123fb..02c9438e9bcbfc9b42ffe44a6d0b8dbc579b7e4d 100644 (file)
--- a/eloop.h
+++ b/eloop.h
@@ -37,6 +37,7 @@
 #define add_timeout_tv(a, b, c) add_q_timeout_tv(ELOOP_QUEUE, a, b, c)
 #define add_timeout_sec(a, b, c) add_q_timeout_sec(ELOOP_QUEUE, a, b, c)
 #define delete_timeout(a, b) delete_q_timeout(ELOOP_QUEUE, a, b)
+#define delete_timeouts(a, ...) delete_q_timeouts(ELOOP_QUEUE, a, __VA_ARGS__)
 
 void add_event(int fd, void (*)(void *), void *);
 void delete_event(int fd);
@@ -45,7 +46,6 @@ void add_q_timeout_tv(int queue, const struct timeval *, void (*)(void *),
     void *);
 void delete_q_timeout(int, void (*)(void *), void *);
 void delete_q_timeouts(int, void *, void (*)(void *), ...);
-void delete_timeouts(void *, void (*)(void *), ...);
 void start_eloop(void);
 
 #endif