netfilter: Remove unnecessary cast on void pointer
authorsimran singhal <singhalsimran0@gmail.com>
Tue, 28 Mar 2017 19:05:16 +0000 (00:35 +0530)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 7 Apr 2017 15:29:17 +0000 (17:29 +0200)
commit68ad546aefddb4dacdb78074df9dddb51424c427
treed2b93e9ccabf2007bf9cc2b11446c37887161d08
parentdedb67c4b4e5fa2e6e149a2ce93e7848aaa9d762
netfilter: Remove unnecessary cast on void pointer

The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T*)x)->f
|

- (T*)
  e
)

Unnecessary parantheses are also remove.

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/bridge/netfilter/ebtables.c
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c
net/netfilter/ipset/ip_set_bitmap_gen.h
net/netfilter/ipset/ip_set_core.c
net/netfilter/nf_conntrack_proto.c
net/netfilter/nft_set_hash.c
net/netfilter/xt_hashlimit.c