Skip to content

Commit

Permalink
[NETFILTER]: x_tables: remove some unnecessary casts
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jun 18, 2006
1 parent 73654d6 commit 3e72b2f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_hashlimit.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ static void
hashlimit_destroy(const struct xt_match *match, void *matchinfo,
unsigned int matchsize)
{
struct ipt_hashlimit_info *r = (struct ipt_hashlimit_info *) matchinfo;
struct ipt_hashlimit_info *r = matchinfo;

htable_put(r->hinfo);
}
Expand Down
2 changes: 1 addition & 1 deletion net/netfilter/xt_connmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ checkentry(const char *tablename,
unsigned int matchsize,
unsigned int hook_mask)
{
struct xt_connmark_info *cm = (struct xt_connmark_info *)matchinfo;
struct xt_connmark_info *cm = matchinfo;

if (cm->mark > 0xffffffff || cm->mask > 0xffffffff) {
printk(KERN_WARNING "connmark: only support 32bit mark\n");
Expand Down
3 changes: 1 addition & 2 deletions net/netfilter/xt_dccp.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ match(const struct sk_buff *skb,
unsigned int protoff,
int *hotdrop)
{
const struct xt_dccp_info *info =
(const struct xt_dccp_info *)matchinfo;
const struct xt_dccp_info *info = matchinfo;
struct dccp_hdr _dh, *dh;

if (offset)
Expand Down
2 changes: 1 addition & 1 deletion net/netfilter/xt_mark.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ checkentry(const char *tablename,
unsigned int matchsize,
unsigned int hook_mask)
{
struct xt_mark_info *minfo = (struct xt_mark_info *) matchinfo;
const struct xt_mark_info *minfo = matchinfo;

if (minfo->mark > 0xffffffff || minfo->mask > 0xffffffff) {
printk(KERN_WARNING "mark: only supports 32bit mark\n");
Expand Down
4 changes: 1 addition & 3 deletions net/netfilter/xt_sctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,9 @@ match(const struct sk_buff *skb,
unsigned int protoff,
int *hotdrop)
{
const struct xt_sctp_info *info;
const struct xt_sctp_info *info = matchinfo;
sctp_sctphdr_t _sh, *sh;

info = (const struct xt_sctp_info *)matchinfo;

if (offset) {
duprintf("Dropping non-first fragment.. FIXME\n");
return 0;
Expand Down
2 changes: 1 addition & 1 deletion net/netfilter/xt_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ static int match(const struct sk_buff *skb,
unsigned int protoff,
int *hotdrop)
{
const struct xt_string_info *conf = matchinfo;
struct ts_state state;
struct xt_string_info *conf = (struct xt_string_info *) matchinfo;

memset(&state, 0, sizeof(struct ts_state));

Expand Down

0 comments on commit 3e72b2f

Please sign in to comment.