aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/fuzzy_backend
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-11-04 21:11:33 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-11-04 21:11:33 +0000
commitb2f0dd775c6d3f78234c5e2d1118eac21490bbd5 (patch)
treeaee4eb0059e2a9b05b3ed39c24e88bcde20bb0b4 /src/libserver/fuzzy_backend
parentf85dfb2f0b80ea030e7106534d1d00b29311ce80 (diff)
downloadrspamd-b2f0dd775c6d3f78234c5e2d1118eac21490bbd5.tar.gz
rspamd-b2f0dd775c6d3f78234c5e2d1118eac21490bbd5.zip
[Minor] Get rid of some compiler warnings
Diffstat (limited to 'src/libserver/fuzzy_backend')
-rw-r--r--src/libserver/fuzzy_backend/fuzzy_backend_redis.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/libserver/fuzzy_backend/fuzzy_backend_redis.c b/src/libserver/fuzzy_backend/fuzzy_backend_redis.c
index efed2fea2..0b7953bfe 100644
--- a/src/libserver/fuzzy_backend/fuzzy_backend_redis.c
+++ b/src/libserver/fuzzy_backend/fuzzy_backend_redis.c
@@ -1426,7 +1426,7 @@ rspamd_fuzzy_backend_update_redis (struct rspamd_fuzzy_backend *bk,
GString *key;
struct fuzzy_peer_cmd *io_cmd;
struct rspamd_fuzzy_cmd *cmd = NULL;
- guint nargs, ncommands, cur_shift;
+ guint nargs, cur_shift;
g_assert (backend != NULL);
@@ -1463,7 +1463,6 @@ rspamd_fuzzy_backend_update_redis (struct rspamd_fuzzy_backend *bk,
* DECR <prefix||fuzzy_count>
*/
- ncommands = 3; /* For MULTI + EXEC + INCR <src> */
nargs = 4;
for (i = 0; i < updates->len; i ++) {
@@ -1477,33 +1476,27 @@ rspamd_fuzzy_backend_update_redis (struct rspamd_fuzzy_backend *bk,
}
if (cmd->cmd == FUZZY_WRITE) {
- ncommands += 5;
nargs += 17;
session->nadded ++;
if (io_cmd->is_shingle) {
- ncommands += RSPAMD_SHINGLE_SIZE;
nargs += RSPAMD_SHINGLE_SIZE * 4;
}
}
else if (cmd->cmd == FUZZY_DEL) {
- ncommands += 2;
nargs += 4;
session->ndeleted ++;
if (io_cmd->is_shingle) {
- ncommands += RSPAMD_SHINGLE_SIZE;
nargs += RSPAMD_SHINGLE_SIZE * 2;
}
}
else if (cmd->cmd == FUZZY_REFRESH) {
- ncommands += 1;
nargs += 3;
session->nextended ++;
if (io_cmd->is_shingle) {
- ncommands += RSPAMD_SHINGLE_SIZE;
nargs += RSPAMD_SHINGLE_SIZE * 3;
}
}