aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorsimran singhal <singhalsimran0@gmail.com>2017-03-29 00:35:16 +0530
committerPablo Neira Ayuso <pablo@netfilter.org>2017-04-07 17:29:17 +0200
commit68ad546aefddb4dacdb78074df9dddb51424c427 (patch)
treed2b93e9ccabf2007bf9cc2b11446c37887161d08 /net/bridge
parentnetfilter: Add nfnl_msg_type() helper function (diff)
downloadlinux-dev-68ad546aefddb4dacdb78074df9dddb51424c427.tar.xz
linux-dev-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/bridge')
-rw-r--r--net/bridge/netfilter/ebtables.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 79b69917f521..bdc629eb0207 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -1713,7 +1713,7 @@ static int compat_copy_entry_to_user(struct ebt_entry *e, void __user **dstptr,
if (*size < sizeof(*ce))
return -EINVAL;
- ce = (struct ebt_entry __user *)*dstptr;
+ ce = *dstptr;
if (copy_to_user(ce, e, sizeof(*ce)))
return -EFAULT;