diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-05-17 14:45:22 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-05-17 14:45:22 +0100 |
commit | bacfb3a57b70a7c366672136178f8b84c21929c6 (patch) | |
tree | fd9841d64a3ba70ebd1a990aebc467ddbe196182 | |
parent | 604ddaaa1a844298daa50b77c5aad4cbc7967c54 (diff) | |
download | rspamd-bacfb3a57b70a7c366672136178f8b84c21929c6.tar.gz rspamd-bacfb3a57b70a7c366672136178f8b84c21929c6.zip |
[Minor] Use atomic
-rw-r--r-- | src/libserver/symbols_cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libserver/symbols_cache.c b/src/libserver/symbols_cache.c index d44b585e9..eac6c8d0c 100644 --- a/src/libserver/symbols_cache.c +++ b/src/libserver/symbols_cache.c @@ -2088,7 +2088,7 @@ rspamd_symbols_cache_resort_cb (gint fd, short what, gpointer ud) for (i = 0; i < cache->items_by_id->len; i ++) { item = g_ptr_array_index (cache->items_by_id, i); item->st->total_hits += item->st->hits; - item->st->hits = 0; + g_atomic_int_set (&item->st->hits, 0); if (item->last_count > 0 && cbdata->w->index == 0) { /* Calculate frequency */ |