]> source.dussan.org Git - rspamd.git/commitdiff
* Fix stupid error with memory copying
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 16 Jul 2009 12:59:46 +0000 (16:59 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 16 Jul 2009 12:59:46 +0000 (16:59 +0400)
src/main.c
src/symbols_cache.c

index cac3b4078749962b4e0ff0434e15a12879038150..6052936edb4e2d2a5c173dc514c99a806e153d9e 100644 (file)
@@ -558,7 +558,7 @@ main (int argc, char **argv, char **env)
                                                                                                                                                        item->s->avg_time);
 
                                        }
-                                       printf ("------------------------------------------------=----------------\n");
+                                       printf ("-----------------------------------------------------------------\n");
                                }
                                l = g_list_next (l);
                        }
@@ -645,7 +645,7 @@ main (int argc, char **argv, char **env)
        l = g_list_first (cfg->metrics_list);
        while (l) {
                metric = l->data;
-               if (!init_symbols_cache (cfg->cfg_pool, metric->cache, metric->cache_filename)) {
+               if (metric->cache && !init_symbols_cache (cfg->cfg_pool, metric->cache, metric->cache_filename)) {
                        exit (EXIT_FAILURE);
                }
                l = g_list_next (l);
index a3ab5edfdc9f99a5e816cacedf0577368f22be24..8ee23b7825b25a944ead9a467a91c6cae47bf4c9 100644 (file)
@@ -79,7 +79,7 @@ grow_cache (struct symbols_cache *cache)
        cache->items = new;
 
        /* Create new saved_cache_items */
-       for (i = old - 1; i < cache->cur_items; i ++) {
+       for (i = old; i < cache->cur_items; i ++) {
                cache->items[i].s = g_new0 (struct saved_cache_item, 1);
        }
 }