]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix types
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 8 Jun 2019 08:32:19 +0000 (09:32 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 8 Jun 2019 08:32:19 +0000 (09:32 +0100)
src/libserver/protocol.c
src/libserver/rspamd_symcache.c

index 3574b94d2f77048638b858f3b627f506bce8aaec..72526ecee3a5e43edee16d4fc511e58c5a3adf75 100644 (file)
@@ -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;
index 1d285dc6f24d1b271d7efa81b0f6eb90e5b91b67..bc3b5295cfd95df9ab8513c374bafb61c9b90bc2 100644 (file)
@@ -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);