commit fc128a6: [Minor] Fix types
Vsevolod Stakhov
vsevolod at highsecure.ru
Sat Jun 8 08:42:52 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-06-08 09:32:19 +0100
URL: https://github.com/rspamd/rspamd/commit/fc128a6dcde3b7758e4f7391ff2b064f37276e8f
[Minor] Fix types
---
src/libserver/protocol.c | 4 ++--
src/libserver/rspamd_symcache.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index 3574b94d2..72526ecee 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -1475,7 +1475,7 @@ rspamd_protocol_write_log_pipe (struct rspamd_task *task)
struct rspamd_metric_result *mres;
struct rspamd_symbol_result *sym;
gint id, i;
- guint32 *sid, n = 0, nextra = 0;
+ guint32 sid, n = 0, nextra = 0;
gsize sz;
GArray *extra;
struct rspamd_protocol_log_symbol_result er;
@@ -1627,7 +1627,7 @@ rspamd_protocol_write_log_pipe (struct rspamd_task *task)
sid = task->settings_id;
if (sid) {
- ls->settings_id = *sid;
+ ls->settings_id = sid;
}
else {
ls->settings_id = 0;
diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c
index 1d285dc6f..bc3b5295c 100644
--- a/src/libserver/rspamd_symcache.c
+++ b/src/libserver/rspamd_symcache.c
@@ -2684,7 +2684,6 @@ rspamd_symcache_finalize_item (struct rspamd_task *task,
struct rspamd_symcache_dynamic_item *dyn_item;
gdouble t2, diff;
guint i;
- struct timeval tv;
const gdouble slow_diff_limit = 300;
/* Sanity checks */
@@ -2713,6 +2712,7 @@ rspamd_symcache_finalize_item (struct rspamd_task *task,
checkpoint->cur_item = NULL;
#ifdef HAVE_EVENT_NO_CACHE_TIME_FUNC
+ struct timeval tv;
event_base_update_cache_time (task->ev_base);
event_base_gettimeofday_cached (task->ev_base, &tv);
t2 = tv_to_double (&tv);
More information about the Commits
mailing list