net: filter: misc/various cleanups
authorDaniel Borkmann <dborkman@redhat.com>
Thu, 1 May 2014 16:34:20 +0000 (18:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 May 2014 23:46:31 +0000 (19:46 -0400)
commiteb9672f4a14bb7058c44efcc31c89737a7724d2c
treeb2104426cf8f08c861f86c49b76e60ab1dc6f691
parent30743837dd204d2b04fd4e9d3db78cc7b118c81a
net: filter: misc/various cleanups

This contains only some minor misc cleanpus. We can spare us the
extra variable declaration in __skb_get_pay_offset(), the cast in
__get_random_u32() is rather unnecessary and in __sk_migrate_realloc()
we can remove the memcpy() and do a direct assignment of the structs.
Latter was suggested by Fengguang Wu found with coccinelle. Also,
remaining pointer casts of long should be unsigned long instead.

Suggested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/filter.c