Commit 3e72b2fe5b31791f976350b023b7a37ef59c02c1
Committed by
David S. Miller
1 parent
73654d61e5
Exists in
master
and in
7 other branches
[NETFILTER]: x_tables: remove some unnecessary casts
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 6 changed files with 6 additions and 9 deletions Side-by-side Diff
net/ipv4/netfilter/ipt_hashlimit.c
... | ... | @@ -561,7 +561,7 @@ |
561 | 561 | hashlimit_destroy(const struct xt_match *match, void *matchinfo, |
562 | 562 | unsigned int matchsize) |
563 | 563 | { |
564 | - struct ipt_hashlimit_info *r = (struct ipt_hashlimit_info *) matchinfo; | |
564 | + struct ipt_hashlimit_info *r = matchinfo; | |
565 | 565 | |
566 | 566 | htable_put(r->hinfo); |
567 | 567 | } |
net/netfilter/xt_connmark.c
... | ... | @@ -58,7 +58,7 @@ |
58 | 58 | unsigned int matchsize, |
59 | 59 | unsigned int hook_mask) |
60 | 60 | { |
61 | - struct xt_connmark_info *cm = (struct xt_connmark_info *)matchinfo; | |
61 | + struct xt_connmark_info *cm = matchinfo; | |
62 | 62 | |
63 | 63 | if (cm->mark > 0xffffffff || cm->mask > 0xffffffff) { |
64 | 64 | printk(KERN_WARNING "connmark: only support 32bit mark\n"); |
net/netfilter/xt_dccp.c
net/netfilter/xt_mark.c
... | ... | @@ -42,7 +42,7 @@ |
42 | 42 | unsigned int matchsize, |
43 | 43 | unsigned int hook_mask) |
44 | 44 | { |
45 | - struct xt_mark_info *minfo = (struct xt_mark_info *) matchinfo; | |
45 | + const struct xt_mark_info *minfo = matchinfo; | |
46 | 46 | |
47 | 47 | if (minfo->mark > 0xffffffff || minfo->mask > 0xffffffff) { |
48 | 48 | printk(KERN_WARNING "mark: only supports 32bit mark\n"); |
net/netfilter/xt_sctp.c
... | ... | @@ -129,10 +129,8 @@ |
129 | 129 | unsigned int protoff, |
130 | 130 | int *hotdrop) |
131 | 131 | { |
132 | - const struct xt_sctp_info *info; | |
132 | + const struct xt_sctp_info *info = matchinfo; | |
133 | 133 | sctp_sctphdr_t _sh, *sh; |
134 | - | |
135 | - info = (const struct xt_sctp_info *)matchinfo; | |
136 | 134 | |
137 | 135 | if (offset) { |
138 | 136 | duprintf("Dropping non-first fragment.. FIXME\n"); |
net/netfilter/xt_string.c