aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/cfg_rcl.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-05 18:20:22 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-05 18:20:22 +0000
commit1e08514471896e3b3069cdc25f457036d257cc68 (patch)
treeb591aa5d3eac5fec70d137d664ccc4b95db63cc4 /src/libserver/cfg_rcl.c
parent9068c5040e2737ce70f0cc9498000efa30c14c74 (diff)
downloadrspamd-1e08514471896e3b3069cdc25f457036d257cc68.tar.gz
rspamd-1e08514471896e3b3069cdc25f457036d257cc68.zip
Fix potential issues as found by coverity.
Diffstat (limited to 'src/libserver/cfg_rcl.c')
-rw-r--r--src/libserver/cfg_rcl.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c
index 14ee4acca..f35dee92d 100644
--- a/src/libserver/cfg_rcl.c
+++ b/src/libserver/cfg_rcl.c
@@ -306,7 +306,7 @@ rspamd_rcl_insert_symbol (struct rspamd_config *cfg, struct metric *metric,
}
val = ucl_object_find_key (obj, "group");
if (val != NULL) {
- ucl_object_tostring_safe (val, &group);
+ group = ucl_object_tostring (val);
}
val = ucl_object_find_key (obj, "one_shot");
if (val != NULL) {
@@ -2017,7 +2017,6 @@ rspamd_config_read (struct rspamd_config *cfg, const gchar *filename,
gchar *data;
GError *err = NULL;
struct rspamd_rcl_section *top, *logger;
- gboolean res;
struct ucl_parser *parser;
if (stat (filename, &st) == -1) {
@@ -2050,11 +2049,6 @@ rspamd_config_read (struct rspamd_config *cfg, const gchar *filename,
munmap (data, st.st_size);
cfg->rcl_obj = ucl_parser_get_object (parser);
ucl_parser_free (parser);
- res = TRUE;
-
- if (!res) {
- return FALSE;
- }
top = rspamd_rcl_config_init ();
err = NULL;