diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-11-16 02:10:31 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-01-10 01:54:45 +0100 |
commit | 75a7cd3c722e1abca14fc375bec8ab30c34ab284 (patch) | |
tree | 34b33b726bbba606ec77b98340331e026ce781a3 /src/cache.c | |
parent | 79ab299bfb20b7fc1982ca90d77d8b908b824fea (diff) | |
download | conntrack-tools-75a7cd3c722e1abca14fc375bec8ab30c34ab284.tar.gz conntrack-tools-75a7cd3c722e1abca14fc375bec8ab30c34ab284.zip |
conntrackd: remove cache_data_get_object and replace by direct pointer
We now include one pointer to the object in the extra section.
This is required to generalize this code for the expectation
support. We consume 4-8 bytes extra, but we will not need more
changes to support expectations which is a good idea.
Diffstat (limited to 'src/cache.c')
-rw-r--r-- | src/cache.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/cache.c b/src/cache.c index f515ba0..7c41e54 100644 --- a/src/cache.c +++ b/src/cache.c @@ -303,11 +303,6 @@ struct cache_object *cache_find(struct cache *c, void *ptr, int *id) return ((struct cache_object *) hashtable_find(c->h, ptr, *id)); } -struct cache_object *cache_data_get_object(struct cache *c, void *data) -{ - return (struct cache_object *)((char*)data - c->extra_offset); -} - void *cache_get_extra(struct cache_object *obj) { return (char*)obj + obj->cache->extra_offset; |