]> source.dussan.org Git - rspamd.git/commitdiff
Fix sort function.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 27 May 2015 15:10:43 +0000 (16:10 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 27 May 2015 15:10:43 +0000 (16:10 +0100)
src/libserver/symbols_cache.c
src/main.c

index 0eae1c238591cf125ef858d18ddaaafd7cf0a070..e04e92b2d38436a8fb53438f75ad2604ef0b4e7c 100644 (file)
@@ -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;
index e58b783d1b7bbe85b5a95992fd0cab1aa78d9c98..33d851b862f9f8c08bebacb34499ba558ab6a3c2 100644 (file)
@@ -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