diff options
author | Patrick McHardy <kaber@trash.net> | 2006-05-29 21:19:19 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-18 00:28:45 -0400 |
commit | 3e72b2fe5b31791f976350b023b7a37ef59c02c1 (patch) | |
tree | 94c34d9264d68141c11530cb94f58ed4d03a1dbd /net | |
parent | 73654d61e556483ad324b90989eae26b22df6ef6 (diff) |
[NETFILTER]: x_tables: remove some unnecessary casts
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/netfilter/ipt_hashlimit.c | 2 | ||||
-rw-r--r-- | net/netfilter/xt_connmark.c | 2 | ||||
-rw-r--r-- | net/netfilter/xt_dccp.c | 3 | ||||
-rw-r--r-- | net/netfilter/xt_mark.c | 2 | ||||
-rw-r--r-- | net/netfilter/xt_sctp.c | 4 | ||||
-rw-r--r-- | net/netfilter/xt_string.c | 2 |
6 files changed, 6 insertions, 9 deletions
diff --git a/net/ipv4/netfilter/ipt_hashlimit.c b/net/ipv4/netfilter/ipt_hashlimit.c index 7c6836c4646e..b88adc7f4b47 100644 --- a/net/ipv4/netfilter/ipt_hashlimit.c +++ b/net/ipv4/netfilter/ipt_hashlimit.c | |||
@@ -561,7 +561,7 @@ static void | |||
561 | hashlimit_destroy(const struct xt_match *match, void *matchinfo, | 561 | hashlimit_destroy(const struct xt_match *match, void *matchinfo, |
562 | unsigned int matchsize) | 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 | htable_put(r->hinfo); | 566 | htable_put(r->hinfo); |
567 | } | 567 | } |
diff --git a/net/netfilter/xt_connmark.c b/net/netfilter/xt_connmark.c index dc26a27cbcaf..56324c8aff0a 100644 --- a/net/netfilter/xt_connmark.c +++ b/net/netfilter/xt_connmark.c | |||
@@ -58,7 +58,7 @@ checkentry(const char *tablename, | |||
58 | unsigned int matchsize, | 58 | unsigned int matchsize, |
59 | unsigned int hook_mask) | 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 | if (cm->mark > 0xffffffff || cm->mask > 0xffffffff) { | 63 | if (cm->mark > 0xffffffff || cm->mask > 0xffffffff) { |
64 | printk(KERN_WARNING "connmark: only support 32bit mark\n"); | 64 | printk(KERN_WARNING "connmark: only support 32bit mark\n"); |
diff --git a/net/netfilter/xt_dccp.c b/net/netfilter/xt_dccp.c index dfb10b648e57..2e2f825dad4c 100644 --- a/net/netfilter/xt_dccp.c +++ b/net/netfilter/xt_dccp.c | |||
@@ -101,8 +101,7 @@ match(const struct sk_buff *skb, | |||
101 | unsigned int protoff, | 101 | unsigned int protoff, |
102 | int *hotdrop) | 102 | int *hotdrop) |
103 | { | 103 | { |
104 | const struct xt_dccp_info *info = | 104 | const struct xt_dccp_info *info = matchinfo; |
105 | (const struct xt_dccp_info *)matchinfo; | ||
106 | struct dccp_hdr _dh, *dh; | 105 | struct dccp_hdr _dh, *dh; |
107 | 106 | ||
108 | if (offset) | 107 | if (offset) |
diff --git a/net/netfilter/xt_mark.c b/net/netfilter/xt_mark.c index 8b385a34886d..876bc5797738 100644 --- a/net/netfilter/xt_mark.c +++ b/net/netfilter/xt_mark.c | |||
@@ -42,7 +42,7 @@ checkentry(const char *tablename, | |||
42 | unsigned int matchsize, | 42 | unsigned int matchsize, |
43 | unsigned int hook_mask) | 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 | if (minfo->mark > 0xffffffff || minfo->mask > 0xffffffff) { | 47 | if (minfo->mark > 0xffffffff || minfo->mask > 0xffffffff) { |
48 | printk(KERN_WARNING "mark: only supports 32bit mark\n"); | 48 | printk(KERN_WARNING "mark: only supports 32bit mark\n"); |
diff --git a/net/netfilter/xt_sctp.c b/net/netfilter/xt_sctp.c index 34bd87259a09..b5110e5b54b0 100644 --- a/net/netfilter/xt_sctp.c +++ b/net/netfilter/xt_sctp.c | |||
@@ -129,11 +129,9 @@ match(const struct sk_buff *skb, | |||
129 | unsigned int protoff, | 129 | unsigned int protoff, |
130 | int *hotdrop) | 130 | int *hotdrop) |
131 | { | 131 | { |
132 | const struct xt_sctp_info *info; | 132 | const struct xt_sctp_info *info = matchinfo; |
133 | sctp_sctphdr_t _sh, *sh; | 133 | sctp_sctphdr_t _sh, *sh; |
134 | 134 | ||
135 | info = (const struct xt_sctp_info *)matchinfo; | ||
136 | |||
137 | if (offset) { | 135 | if (offset) { |
138 | duprintf("Dropping non-first fragment.. FIXME\n"); | 136 | duprintf("Dropping non-first fragment.. FIXME\n"); |
139 | return 0; | 137 | return 0; |
diff --git a/net/netfilter/xt_string.c b/net/netfilter/xt_string.c index 79d9ea6964ba..0ebb6ac2c8c7 100644 --- a/net/netfilter/xt_string.c +++ b/net/netfilter/xt_string.c | |||
@@ -30,8 +30,8 @@ static int match(const struct sk_buff *skb, | |||
30 | unsigned int protoff, | 30 | unsigned int protoff, |
31 | int *hotdrop) | 31 | int *hotdrop) |
32 | { | 32 | { |
33 | const struct xt_string_info *conf = matchinfo; | ||
33 | struct ts_state state; | 34 | struct ts_state state; |
34 | struct xt_string_info *conf = (struct xt_string_info *) matchinfo; | ||
35 | 35 | ||
36 | memset(&state, 0, sizeof(struct ts_state)); | 36 | memset(&state, 0, sizeof(struct ts_state)); |
37 | 37 | ||