aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/backends
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-11 16:43:34 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-10-11 16:43:34 +0100
commit319f53a4b2c812ebd827d5e11c046423bc9feced (patch)
treea035217e6cc69ac133c53bdf84c85cec07426274 /src/libstat/backends
parent196fc45d6b71c39453e1906920368ad9e0bb73e0 (diff)
downloadrspamd-319f53a4b2c812ebd827d5e11c046423bc9feced.tar.gz
rspamd-319f53a4b2c812ebd827d5e11c046423bc9feced.zip
[CritFix] Fix processing of learned tokens count for redis backend
Diffstat (limited to 'src/libstat/backends')
-rw-r--r--src/libstat/backends/redis_backend.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c
index 4ff9b08b1..72b3a3491 100644
--- a/src/libstat/backends/redis_backend.c
+++ b/src/libstat/backends/redis_backend.c
@@ -749,7 +749,7 @@ rspamd_redis_connected (redisAsyncContext *c, gpointer r, gpointer priv)
if (c->err == 0) {
if (r != NULL) {
- if (G_LIKELY (reply->type == REDIS_REPLY_INTEGER)) {
+ if (G_UNLIKELY (reply->type == REDIS_REPLY_INTEGER)) {
val = reply->integer;
}
else if (reply->type == REDIS_REPLY_STRING) {
@@ -807,7 +807,7 @@ rspamd_redis_processed (redisAsyncContext *c, gpointer r, gpointer priv)
tok = g_ptr_array_index (task->tokens, i);
elt = reply->element[i];
- if (G_LIKELY (elt->type == REDIS_REPLY_INTEGER)) {
+ if (G_UNLIKELY (elt->type == REDIS_REPLY_INTEGER)) {
tok->values[rt->id] = elt->integer;
found ++;
}