commit c3c811c: [Fix] Fix unused results

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Sep 4 19:14:10 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-09-04 20:08:23 +0100
URL: https://github.com/rspamd/rspamd/commit/c3c811c76741dfe5c6feef293068eb90fc10bfdf (HEAD -> master)

[Fix] Fix unused results

---
 src/libserver/cfg_file.h | 2 +-
 src/plugins/dkim_check.c | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h
index 5c6c682a1..a0498e402 100644
--- a/src/libserver/cfg_file.h
+++ b/src/libserver/cfg_file.h
@@ -545,7 +545,7 @@ void rspamd_config_free (struct rspamd_config *cfg);
  */
 const ucl_object_t *rspamd_config_get_module_opt (struct rspamd_config *cfg,
 												  const gchar *module_name,
-												  const gchar *opt_name);
+												  const gchar *opt_name) G_GNUC_WARN_UNUSED_RESULT;
 
 
 /**
diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c
index aa4f4119a..43331d9d9 100644
--- a/src/plugins/dkim_check.c
+++ b/src/plugins/dkim_check.c
@@ -342,7 +342,7 @@ dkim_module_config (struct rspamd_config *cfg)
 	value = rspamd_config_get_module_opt (cfg, "dkim", "check_local");
 
 	if (value == NULL) {
-		rspamd_config_get_module_opt (cfg, "options", "check_local");
+		value = rspamd_config_get_module_opt (cfg, "options", "check_local");
 	}
 
 	if (value != NULL) {
@@ -352,10 +352,12 @@ dkim_module_config (struct rspamd_config *cfg)
 		dkim_module_ctx->check_local = FALSE;
 	}
 
-	value = rspamd_config_get_module_opt (cfg, "dkim", "check_authed");
+	value = rspamd_config_get_module_opt (cfg, "dkim",
+			"check_authed");
 
 	if (value == NULL) {
-		rspamd_config_get_module_opt (cfg, "options", "check_authed");
+		value = rspamd_config_get_module_opt (cfg, "options",
+				"check_authed");
 	}
 
 	if (value != NULL) {


More information about the Commits mailing list