]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Punt this now un-used function eloop_q_timeouts_delete
authorRoy Marples <roy@marples.name>
Sat, 13 Sep 2014 14:55:55 +0000 (14:55 +0000)
committerRoy Marples <roy@marples.name>
Sat, 13 Sep 2014 14:55:55 +0000 (14:55 +0000)
eloop.c
eloop.h

diff --git a/eloop.c b/eloop.c
index 9181390244bd349e8f3501f5fef83d61f9d128db..3cb0fedca13d492d7b416d85287fe83aac835960 100644 (file)
--- a/eloop.c
+++ b/eloop.c
@@ -233,46 +233,6 @@ eloop_timeout_add_now(struct eloop_ctx *ctx,
        return 0;
 }
 
-/* This deletes all timeouts for the interface EXCEPT for ones with the
- * callbacks given. Handy for deleting everything apart from the expire
- * timeout. */
-static void
-eloop_q_timeouts_delete_v(struct eloop_ctx *ctx, int queue, void *arg,
-    void (*callback)(void *), va_list v)
-{
-       struct eloop_timeout *t, *tt;
-       va_list va;
-       void (*f)(void *);
-
-       TAILQ_FOREACH_SAFE(t, &ctx->timeouts, next, tt) {
-               if ((queue == 0 || t->queue == queue) && t->arg == arg &&
-                   t->callback != callback)
-               {
-                       va_copy(va, v);
-                       while ((f = va_arg(va, void (*)(void *)))) {
-                               if (f == t->callback)
-                                       break;
-                       }
-                       va_end(va);
-                       if (f == NULL) {
-                               TAILQ_REMOVE(&ctx->timeouts, t, next);
-                               TAILQ_INSERT_TAIL(&ctx->free_timeouts, t, next);
-                       }
-               }
-       }
-}
-
-void
-eloop_q_timeouts_delete(struct eloop_ctx *ctx, int queue,
-    void *arg, void (*callback)(void *), ...)
-{
-       va_list va;
-
-       va_start(va, callback);
-       eloop_q_timeouts_delete_v(ctx, queue, arg, callback, va);
-       va_end(va);
-}
-
 void
 eloop_q_timeout_delete(struct eloop_ctx *ctx, int queue,
     void (*callback)(void *), void *arg)
diff --git a/eloop.h b/eloop.h
index 7e817f82c624d05db7b05c816c74a16bb0476db4..7f062d25a122fc8c0fcc0af9579bd5b82242fcee 100644 (file)
--- a/eloop.h
+++ b/eloop.h
@@ -80,8 +80,6 @@ struct eloop_ctx {
     eloop_q_timeout_add_sec(a, ELOOP_QUEUE, b, c, d)
 #define eloop_timeout_delete(a, b, c) \
     eloop_q_timeout_delete(a, ELOOP_QUEUE, b, c)
-#define eloop_timeouts_delete(a, b, ...) \
-    eloop_q_timeouts_delete(a, ELOOP_QUEUE, b, __VA_ARGS__)
 
 int eloop_event_add(struct eloop_ctx *, int,
     void (*)(void *), void *,
@@ -93,8 +91,6 @@ int eloop_q_timeout_add_tv(struct eloop_ctx *, int queue,
     const struct timeval *, void (*)(void *), void *);
 int eloop_timeout_add_now(struct eloop_ctx *, void (*)(void *), void *);
 void eloop_q_timeout_delete(struct eloop_ctx *, int, void (*)(void *), void *);
-void eloop_q_timeouts_delete(struct eloop_ctx *, int, void *,
-    void (*)(void *), ...);
 struct eloop_ctx * eloop_init(void);
 void eloop_free(struct eloop_ctx *);
 void eloop_exit(struct eloop_ctx *, int);