]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix unused results
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 4 Sep 2020 19:08:23 +0000 (20:08 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 4 Sep 2020 19:08:23 +0000 (20:08 +0100)
src/libserver/cfg_file.h
src/plugins/dkim_check.c

index 5c6c682a1695caf43495d36d98be480d7a4ba229..a0498e4026bc7e2c718a5528364c30ccafabefca 100644 (file)
@@ -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;
 
 
 /**
index aa4f4119a953cfa6c98f5b66d8638aeb959123d4..43331d9d93743f1b9a7fddb24faa6e422976662d 100644 (file)
@@ -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) {