[NETFILTER]: x_tables: switch xt_match->match to bool
[deliverable/linux.git] / net / ipv4 / netfilter / ipt_addrtype.c
index a9a9b750ff2d0d636bf62d8faa76bd9cbb7637d1..abea446a4437c0656bf2ba013a255258a7ba3e3c 100644 (file)
@@ -22,19 +22,19 @@ MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>");
 MODULE_DESCRIPTION("iptables addrtype match");
 
-static inline int match_type(__be32 addr, u_int16_t mask)
+static inline bool match_type(__be32 addr, u_int16_t mask)
 {
        return !!(mask & (1 << inet_addr_type(addr)));
 }
 
-static int match(const struct sk_buff *skb,
-                const struct net_device *in, const struct net_device *out,
-                const struct xt_match *match, const void *matchinfo,
-                int offset, unsigned int protoff, bool *hotdrop)
+static bool match(const struct sk_buff *skb,
+                 const struct net_device *in, const struct net_device *out,
+                 const struct xt_match *match, const void *matchinfo,
+                 int offset, unsigned int protoff, bool *hotdrop)
 {
        const struct ipt_addrtype_info *info = matchinfo;
        const struct iphdr *iph = ip_hdr(skb);
-       int ret = 1;
+       bool ret = true;
 
        if (info->source)
                ret &= match_type(iph->saddr, info->source)^info->invert_source;
This page took 0.025372 seconds and 5 git commands to generate.