aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/backends/redis_backend.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-10-12 20:33:48 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-10-12 20:33:48 +0100
commite2e021a18220d7966cd7888db912e98108d717f7 (patch)
treec6a3139c12026bf7afe4ab8fc8059249a3837a8b /src/libstat/backends/redis_backend.c
parentb68e6b885974acbbf75b244224ca87b2fcf304fc (diff)
downloadrspamd-e2e021a18220d7966cd7888db912e98108d717f7.tar.gz
rspamd-e2e021a18220d7966cd7888db912e98108d717f7.zip
[Minor] Fix some minor code quality issue
Found by: coverity scan
Diffstat (limited to 'src/libstat/backends/redis_backend.c')
-rw-r--r--src/libstat/backends/redis_backend.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstat/backends/redis_backend.c b/src/libstat/backends/redis_backend.c
index 2fd69f436..fdbb77f78 100644
--- a/src/libstat/backends/redis_backend.c
+++ b/src/libstat/backends/redis_backend.c
@@ -153,15 +153,17 @@ rspamd_redis_expand_object (const gchar *pattern,
gint err_idx;
g_assert (ctx != NULL);
+ g_assert (task != NULL);
stcf = ctx->stcf;
L = task->cfg->lua_state;
+ g_assert (L != NULL);
if (ctx->enable_users) {
if (ctx->cbref_user == -1) {
rcpt = rspamd_task_get_principal_recipient (task);
}
- else if (L) {
+ else {
/* Execute lua function to get userdata */
lua_pushcfunction (L, &rspamd_lua_traceback);
err_idx = lua_gettop (L);
@@ -269,7 +271,7 @@ rspamd_redis_expand_object (const gchar *pattern,
}
- if (target == NULL || task == NULL) {
+ if (target == NULL) {
return -1;
}