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>
This commit is contained in:

committed by
Pablo Neira Ayuso

parent
dedb67c4b4
commit
68ad546aef
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user