From c81c04811e98e633b0610bad2e7d2b55302022ae Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 9 Jun 2014 22:49:08 +0200 Subject: [PATCH] make the "records" avl tree static Signed-off-by: Felix Fietkau --- cache.c | 4 ++-- cache.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cache.c b/cache.c index 2658bd6..1cbe18f 100644 --- a/cache.c +++ b/cache.c @@ -42,7 +42,8 @@ #include "interface.h" static struct uloop_timeout cache_gc; -struct avl_tree records, entries; +struct avl_tree entries; +static AVL_TREE(records, avl_strcmp, true, NULL); static void cache_record_free(struct cache_record *r) @@ -93,7 +94,6 @@ int cache_init(void) { avl_init(&entries, avl_strcmp, true, NULL); - avl_init(&records, avl_strcmp, true, NULL); cache_gc.cb = cache_gc_timer; uloop_timeout_set(&cache_gc, 10000); diff --git a/cache.h b/cache.h index 2286afb..b4433eb 100644 --- a/cache.h +++ b/cache.h @@ -42,7 +42,7 @@ struct cache_record { time_t time; }; -extern struct avl_tree records, entries; +extern struct avl_tree entries; int cache_init(void); void cache_scan(void); -- 2.11.0