aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-10-04 12:51:12 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-10-04 12:51:12 +0100
commit39dfdab80d11c6bc7b10f37d819414358d5249f9 (patch)
treecca9a8af22233ad25d89314567ec03d9b8eac2d1
parent27ffa75d2b359e9107c5a62c307692260037ccdc (diff)
downloadrspamd-39dfdab80d11c6bc7b10f37d819414358d5249f9.tar.gz
rspamd-39dfdab80d11c6bc7b10f37d819414358d5249f9.zip
[Minor] Remove unused struct timeval
-rw-r--r--src/libserver/monitored.c2
-rw-r--r--src/libserver/worker_util.c5
-rw-r--r--src/rspamd.c3
3 files changed, 0 insertions, 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);