From: Jan Engelhardt Date: Wed, 8 Oct 2008 09:35:16 +0000 (+0200) Subject: netfilter: remove redundant casts from Ebtables X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f7277f8d3aa4d3f99a9bdb48b27a2344a637a4b2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git netfilter: remove redundant casts from Ebtables Signed-off-by: Jan Engelhardt Signed-off-by: Patrick McHardy --- diff --git a/net/bridge/netfilter/ebt_arpreply.c b/net/bridge/netfilter/ebt_arpreply.c index 0e51c8d7e5f2..baf5510d044c 100644 --- a/net/bridge/netfilter/ebt_arpreply.c +++ b/net/bridge/netfilter/ebt_arpreply.c @@ -20,7 +20,7 @@ ebt_arpreply_tg(struct sk_buff *skb, const struct net_device *in, const struct net_device *out, unsigned int hook_nr, const struct xt_target *target, const void *data) { - struct ebt_arpreply_info *info = (void *)data; + const struct ebt_arpreply_info *info = data; const __be32 *siptr, *diptr; __be32 _sip, _dip; const struct arphdr *ap; diff --git a/net/bridge/netfilter/ebt_ip6.c b/net/bridge/netfilter/ebt_ip6.c index 317e624ae59f..7bd983129674 100644 --- a/net/bridge/netfilter/ebt_ip6.c +++ b/net/bridge/netfilter/ebt_ip6.c @@ -32,7 +32,7 @@ ebt_ip6_mt(const struct sk_buff *skb, const struct net_device *in, const struct net_device *out, const struct xt_match *match, const void *data, int offset, unsigned int protoff, bool *hotdrop) { - const struct ebt_ip6_info *info = (struct ebt_ip6_info *)data; + const struct ebt_ip6_info *info = data; const struct ipv6hdr *ih6; struct ipv6hdr _ip6h; const struct tcpudphdr *pptr; @@ -98,7 +98,7 @@ ebt_ip6_mt_check(const char *table, const void *entry, unsigned int hook_mask) { const struct ebt_entry *e = entry; - struct ebt_ip6_info *info = (struct ebt_ip6_info *)data; + struct ebt_ip6_info *info = data; if (e->ethproto != htons(ETH_P_IPV6) || e->invflags & EBT_IPROTO) return false; diff --git a/net/bridge/netfilter/ebt_limit.c b/net/bridge/netfilter/ebt_limit.c index 43d9a5003633..58aaaa149068 100644 --- a/net/bridge/netfilter/ebt_limit.c +++ b/net/bridge/netfilter/ebt_limit.c @@ -35,7 +35,7 @@ ebt_limit_mt(const struct sk_buff *skb, const struct net_device *in, const struct net_device *out, const struct xt_match *match, const void *data, int offset, unsigned int protoff, bool *hotdrop) { - struct ebt_limit_info *info = (struct ebt_limit_info *)data; + struct ebt_limit_info *info = (void *)data; unsigned long now = jiffies; spin_lock_bh(&limit_lock); diff --git a/net/bridge/netfilter/ebt_nflog.c b/net/bridge/netfilter/ebt_nflog.c index 917ac3600791..74b4fa0aabc1 100644 --- a/net/bridge/netfilter/ebt_nflog.c +++ b/net/bridge/netfilter/ebt_nflog.c @@ -24,7 +24,7 @@ ebt_nflog_tg(struct sk_buff *skb, const struct net_device *in, const struct net_device *out, unsigned int hooknr, const struct xt_target *target, const void *data) { - struct ebt_nflog_info *info = (struct ebt_nflog_info *)data; + const struct ebt_nflog_info *info = data; struct nf_loginfo li; li.type = NF_LOG_TYPE_ULOG; @@ -41,7 +41,7 @@ ebt_nflog_tg_check(const char *table, const void *e, const struct xt_target *target, void *data, unsigned int hookmask) { - struct ebt_nflog_info *info = (struct ebt_nflog_info *)data; + struct ebt_nflog_info *info = data; if (info->flags & ~EBT_NFLOG_MASK) return false;