]> source.dussan.org Git - rspamd.git/commitdiff
Fix cache init
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 5 Jan 2016 18:07:27 +0000 (18:07 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 5 Jan 2016 18:07:27 +0000 (18:07 +0000)
src/libstat/learn_cache/sqlite3_cache.c

index f5ef89cebdfa5a0755d8fd005e43bdbf549cf047..9590d00b5ddb596fc8278ce1e050d6edaf286728 100644 (file)
@@ -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);