From: Vsevolod Stakhov Date: Wed, 27 May 2015 15:10:43 +0000 (+0100) Subject: Fix sort function. X-Git-Tag: 1.0.0~604 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=634d1e599394c5cbe167285e632576552e42dcff;p=rspamd.git Fix sort function. --- 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