]> err.no Git - linux-2.6/commitdiff
[NETFILTER]: x_tables: remove some unnecessary casts
authorPatrick McHardy <kaber@trash.net>
Tue, 30 May 2006 01:19:19 +0000 (18:19 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Sun, 18 Jun 2006 04:28:45 +0000 (21:28 -0700)
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/ipt_hashlimit.c
net/netfilter/xt_connmark.c
net/netfilter/xt_dccp.c
net/netfilter/xt_mark.c
net/netfilter/xt_sctp.c
net/netfilter/xt_string.c

index 7c6836c4646e12e772c952d42e0372b5b5c23d34..b88adc7f4b4702305012db2cd8c5189f5c782a19 100644 (file)
@@ -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);
 }
index dc26a27cbcafc2df58bad0ca5687a71d0aa29edf..56324c8aff0a76c9507fc4133dd5ad194d360bfb 100644 (file)
@@ -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");
index dfb10b648e570c0fce716bdae0644349f66357b9..2e2f825dad4c35744d0121aafbe1e74e7bd362c5 100644 (file)
@@ -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)
index 8b385a34886de4fdbf9c324377dc1348a20e815c..876bc57977381bc62ffd6c11c077cd3570428e1f 100644 (file)
@@ -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");
index 34bd87259a09fea8b84671104c6a314cad5aafbd..b5110e5b54b046989fb3d7fa1abb3b5d437419b9 100644 (file)
@@ -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;
index 79d9ea6964ba0a284de74cf2386ed89ab7a9a3da..0ebb6ac2c8c769a2b1a19075d10dc35a1143a32a 100644 (file)
@@ -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));