summaryrefslogtreecommitdiffstats
path: root/src/libstat/learn_cache
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-05 18:07:27 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-05 18:07:27 +0000
commitc3f06a6a9cadbbc8c852f6ebe361c917aff3e384 (patch)
treee23d758fbcf07e97c9b1b34ac6a239d104e93dc1 /src/libstat/learn_cache
parent8be715956820c4b14d3a3d7f41e50e4e69b7e679 (diff)
downloadrspamd-c3f06a6a9cadbbc8c852f6ebe361c917aff3e384.tar.gz
rspamd-c3f06a6a9cadbbc8c852f6ebe361c917aff3e384.zip
Fix cache init
Diffstat (limited to 'src/libstat/learn_cache')
-rw-r--r--src/libstat/learn_cache/sqlite3_cache.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libstat/learn_cache/sqlite3_cache.c b/src/libstat/learn_cache/sqlite3_cache.c
index f5ef89ceb..9590d00b5 100644
--- a/src/libstat/learn_cache/sqlite3_cache.c
+++ b/src/libstat/learn_cache/sqlite3_cache.c
@@ -127,7 +127,7 @@ rspamd_stat_cache_sqlite3_init(struct rspamd_stat_ctx *ctx,
struct rspamd_stat_sqlite3_ctx *new = NULL;
const ucl_object_t *elt;
gchar dbpath[PATH_MAX];
- const gchar *path;
+ const gchar *path = SQLITE_CACHE_PATH;
sqlite3 *sqlite;
GError *err = NULL;
@@ -138,9 +138,6 @@ rspamd_stat_cache_sqlite3_init(struct rspamd_stat_ctx *ctx,
if (elt != NULL) {
path = ucl_object_tostring (elt);
}
- else {
- path = SQLITE_CACHE_PATH;
- }
}
rspamd_snprintf (dbpath, sizeof (dbpath), "%s", path);