From 39dfdab80d11c6bc7b10f37d819414358d5249f9 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 4 Oct 2019 12:51:12 +0100 Subject: [Minor] Remove unused struct timeval --- src/libserver/monitored.c | 2 -- src/libserver/worker_util.c | 5 ----- src/rspamd.c | 3 --- 3 files changed, 10 deletions(-) diff --git a/src/libserver/monitored.c b/src/libserver/monitored.c index 821e128d6..256651129 100644 --- a/src/libserver/monitored.c +++ b/src/libserver/monitored.c @@ -172,13 +172,11 @@ static void rspamd_monitored_periodic (EV_P_ ev_timer *w, int revents) { struct rspamd_monitored *m = (struct rspamd_monitored *)w->data; - struct timeval tv; gdouble jittered; gboolean ret = FALSE; jittered = rspamd_time_jitter (m->ctx->monitoring_interval * m->monitoring_mult, 0.0); - double_to_tv (jittered, &tv); if (m->proc.monitored_update) { ret = m->proc.monitored_update (m, m->ctx, m->proc.ud); diff --git a/src/libserver/worker_util.c b/src/libserver/worker_util.c index 0007fbe35..4779fd57a 100644 --- a/src/libserver/worker_util.c +++ b/src/libserver/worker_util.c @@ -172,15 +172,10 @@ static gboolean rspamd_worker_usr2_handler (struct rspamd_worker_signal_handler *sigh, void *arg) { /* Do not accept new connections, preparing to end worker's process */ - struct timeval tv; - if (!sigh->worker->wanna_die) { static ev_timer shutdown_ev; rspamd_worker_ignore_signal (sigh); - - tv.tv_sec = SOFT_SHUTDOWN_TIME; - tv.tv_usec = 0; sigh->worker->wanna_die = TRUE; rspamd_worker_terminate_handlers (sigh->worker); rspamd_default_log_function (G_LOG_LEVEL_INFO, diff --git a/src/rspamd.c b/src/rspamd.c index 108a8454f..10baf2050 100644 --- a/src/rspamd.c +++ b/src/rspamd.c @@ -359,14 +359,11 @@ rspamd_fork_delayed (struct rspamd_worker_conf *cf, struct rspamd_main *rspamd_main) { struct waiting_worker *nw; - struct timeval tv; nw = g_malloc0 (sizeof (*nw)); nw->cf = cf; nw->oldindex = index; nw->rspamd_main = rspamd_main; - tv.tv_sec = SOFT_FORK_TIME; - tv.tv_usec = 0; REF_RETAIN (cf); nw->wait_ev.data = nw; ev_timer_init (&nw->wait_ev, rspamd_fork_delayed_cb, SOFT_FORK_TIME, 0.0); -- cgit v1.2.3