From: Roy Marples Date: Sat, 13 Sep 2014 14:55:55 +0000 (+0000) Subject: Punt this now un-used function eloop_q_timeouts_delete X-Git-Tag: v6.4.4~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b9347815c2781ff2fd03c997025eac12ec8cfc26;p=thirdparty%2Fdhcpcd.git Punt this now un-used function eloop_q_timeouts_delete --- diff --git a/eloop.c b/eloop.c index 91813902..3cb0fedc 100644 --- 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 7e817f82..7f062d25 100644 --- 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);