[kernel] netfilter: fix compiler warnings in xt_layer7
[openwrt/svn-archive/archive.git] / target / linux / generic-2.6 / patches-2.6.23 / 100-netfilter_layer7_2.17.patch
index c49bd727d96469295a068a33fcce38b7754cfd5f..fb438106ae4deda6c66ee50cbf9b9350444cef69 100644 (file)
 +      return count;
 +}
 +
 +      return count;
 +}
 +
-+static int
++static bool
 +match(const struct sk_buff *skbin,
 +      const struct net_device *in,
 +      const struct net_device *out,
 +match(const struct sk_buff *skbin,
 +      const struct net_device *in,
 +      const struct net_device *out,
 +      const void *matchinfo,
 +      int offset,
 +      unsigned int protoff,
 +      const void *matchinfo,
 +      int offset,
 +      unsigned int protoff,
-+      int *hotdrop)
++      bool *hotdrop)
 +{
 +      /* sidestep const without getting a compiler warning... */
 +      struct sk_buff * skb = (struct sk_buff *)skbin; 
 +{
 +      /* sidestep const without getting a compiler warning... */
 +      struct sk_buff * skb = (struct sk_buff *)skbin; 
 +      return (pattern_result ^ info->invert);
 +}
 +
 +      return (pattern_result ^ info->invert);
 +}
 +
-+static int check(const char *tablename,
++static bool check(const char *tablename,
 +               const void *inf,
 +               const struct xt_match *match,
 +               void *matchinfo,
 +               const void *inf,
 +               const struct xt_match *match,
 +               void *matchinfo,
 +        if (nf_ct_l3proto_try_module_get(match->family) < 0) {
 +                printk(KERN_WARNING "can't load conntrack support for "
 +                                    "proto=%d\n", match->family);
 +        if (nf_ct_l3proto_try_module_get(match->family) < 0) {
 +                printk(KERN_WARNING "can't load conntrack support for "
 +                                    "proto=%d\n", match->family);
-+                return 0;
++                return false;
 +        }
 +        }
-+      return 1;
++      return true;
 +}
 +
 +static void
 +}
 +
 +static void