diff options
author | Patrick McHardy <kaber@trash.net> | 2009-03-31 04:14:21 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-03-31 04:14:21 +0200 |
commit | 9fe2e9d494a229a3f833add44d7242abe46aa156 (patch) | |
tree | 152b43bffced212b2da4512c47bc9c1f23dc1948 /src/netlink.c | |
parent | 6ed76e7024c2ec021ac0a4e08b1f0b26e98a01c5 (diff) |
netlink: use libnl OBJ_CAST macro
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src/netlink.c')
-rw-r--r-- | src/netlink.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/netlink.c b/src/netlink.c index 7ba90114..548f4fb8 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -199,8 +199,7 @@ static int netlink_list_rules(struct netlink_ctx *ctx, const struct handle *h) nl_geterror(err)); nlr = alloc_nft_rule(h); - nl_cache_foreach_filter(rule_cache, (struct nl_object *)nlr, - list_rule_cb, ctx); + nl_cache_foreach_filter(rule_cache, OBJ_CAST(nlr), list_rule_cb, ctx); nfnl_nft_rule_put(nlr); nl_cache_free(rule_cache); return 0; @@ -254,8 +253,7 @@ static int netlink_flush_rules(struct netlink_ctx *ctx, const struct handle *h) nl_geterror(err)); nlr = alloc_nft_rule(h); - nl_cache_foreach_filter(rule_cache, (struct nl_object *)nlr, - flush_rule_cb, ctx); + nl_cache_foreach_filter(rule_cache, OBJ_CAST(nlr), flush_rule_cb, ctx); nfnl_nft_rule_put(nlr); nl_cache_free(rule_cache); return 0; @@ -332,8 +330,7 @@ int netlink_list_chains(struct netlink_ctx *ctx, const struct handle *h) nl_geterror(err)); nlc = alloc_nft_chain(h); - nl_cache_foreach_filter(chain_cache, (struct nl_object *)nlc, - list_chain_cb, ctx); + nl_cache_foreach_filter(chain_cache, OBJ_CAST(nlc), list_chain_cb, ctx); nfnl_nft_chain_put(nlc); nl_cache_free(chain_cache); return 0; @@ -436,8 +433,7 @@ int netlink_list_tables(struct netlink_ctx *ctx, const struct handle *h) nl_geterror(err)); nlt = alloc_nft_table(h); - nl_cache_foreach_filter(table_cache, (struct nl_object *)nlt, - list_table_cb, ctx); + nl_cache_foreach_filter(table_cache, OBJ_CAST(nlt), list_table_cb, ctx); nfnl_nft_table_put(nlt); nl_cache_free(table_cache); return 0; |