aboutsummaryrefslogtreecommitdiff
path: root/net/netfilter/ipset/ip_set_core.c
diff options
context:
space:
mode:
authorGravatar simran singhal <singhalsimran0@gmail.com> 2017-03-29 00:35:16 +0530
committerGravatar Pablo Neira Ayuso <pablo@netfilter.org> 2017-04-07 17:29:17 +0200
commit68ad546aefddb4dacdb78074df9dddb51424c427 (patch)
treed2b93e9ccabf2007bf9cc2b11446c37887161d08 /net/netfilter/ipset/ip_set_core.c
parentnetfilter: Add nfnl_msg_type() helper function (diff)
downloadlinux-68ad546aefddb4dacdb78074df9dddb51424c427.tar.gz
linux-68ad546aefddb4dacdb78074df9dddb51424c427.tar.bz2
linux-68ad546aefddb4dacdb78074df9dddb51424c427.zip
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>
Diffstat (limited to 'net/netfilter/ipset/ip_set_core.c')
-rw-r--r--net/netfilter/ipset/ip_set_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c
index 731ba9c0cf9b..c637710d861c 100644
--- a/net/netfilter/ipset/ip_set_core.c
+++ b/net/netfilter/ipset/ip_set_core.c
@@ -1915,7 +1915,7 @@ ip_set_sockfn_get(struct sock *sk, int optval, void __user *user, int *len)
ret = -EFAULT;
goto done;
}
- op = (unsigned int *)data;
+ op = data;
if (*op < IP_SET_OP_VERSION) {
/* Check the version at the beginning of operations */