projects
/
project
/
mdnsd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c1fe9a
)
make the "records" avl tree static
author
Felix Fietkau
<nbd@openwrt.org>
Mon, 9 Jun 2014 20:49:08 +0000
(22:49 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 9 Jun 2014 20:49:08 +0000
(22:49 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
cache.c
patch
|
blob
|
history
cache.h
patch
|
blob
|
history
diff --git
a/cache.c
b/cache.c
index 2658bd6b6816259f0bd33c1efb031a68922b3a03..1cbe18f0a520ebcb8df13034739d5c4b5792dad0 100644
(file)
--- 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 2286afbbe20476b9e3c9a068310b6a80d5a801a6..b4433eb9424a81fb3693528aac641845041a429b 100644
(file)
--- 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);