diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-01-04 14:31:41 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-01-10 01:54:45 +0100 |
commit | 79ab299bfb20b7fc1982ca90d77d8b908b824fea (patch) | |
tree | a7fe20e7685f967da400675c42fce9f6f634a30f /src/cache.c | |
parent | 598e465087365db1fa36b67aa53d291e400ec5b1 (diff) | |
download | conntrack-tools-79ab299bfb20b7fc1982ca90d77d8b908b824fea.tar.gz conntrack-tools-79ab299bfb20b7fc1982ca90d77d8b908b824fea.zip |
conntrackd: simplify cache_get_extra function
This patch simplifies cache_get_extra which now takes only one
parameter that is the cache_object. With it, the extra area can be
calculated.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/cache.c')
-rw-r--r-- | src/cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cache.c b/src/cache.c index efdab0e..f515ba0 100644 --- a/src/cache.c +++ b/src/cache.c @@ -308,9 +308,9 @@ 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 *c, void *data) +void *cache_get_extra(struct cache_object *obj) { - return (char*)data + c->extra_offset; + return (char*)obj + obj->cache->extra_offset; } void cache_stats(const struct cache *c, int fd) |