aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-27 16:10:43 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-27 16:10:43 +0100
commit634d1e599394c5cbe167285e632576552e42dcff (patch)
tree3d4bc4d58e5aff56af8edb89ec0fbcc1566cfdda /src
parente64c5411ff18eea69861b6ea11574a39c7290b57 (diff)
downloadrspamd-634d1e599394c5cbe167285e632576552e42dcff.tar.gz
rspamd-634d1e599394c5cbe167285e632576552e42dcff.zip
Fix sort function.
Diffstat (limited to 'src')
-rw-r--r--src/libserver/symbols_cache.c3
-rw-r--r--src/main.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/src/libserver/symbols_cache.c b/src/libserver/symbols_cache.c
index 0eae1c238..e04e92b2d 100644
--- a/src/libserver/symbols_cache.c
+++ b/src/libserver/symbols_cache.c
@@ -87,7 +87,8 @@ struct cache_item {
gint
cache_logic_cmp (const void *p1, const void *p2)
{
- const struct cache_item *i1 = p1, *i2 = p2;
+ const struct cache_item *i1 = *(struct cache_item **)p1,
+ *i2 = *(struct cache_item **)p2;
double w1, w2;
double weight1, weight2;
double f1 = 0, f2 = 0, t1, t2;
diff --git a/src/main.c b/src/main.c
index e58b783d1..33d851b86 100644
--- a/src/main.c
+++ b/src/main.c
@@ -797,9 +797,7 @@ static void
init_cfg_cache (struct rspamd_config *cfg)
{
- if (!init_symbols_cache (cfg->cache, cfg)) {
- exit (EXIT_FAILURE);
- }
+ init_symbols_cache (cfg->cache, cfg);
}
static gint