diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-01-20 14:48:23 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2011-01-20 14:48:23 +0100 |
commit | c8396bdc040f4b16e6f6e3f8b81b9fb67a499d9c (patch) | |
tree | 0704d9f117fb9fefed1b9ec5e680e765d80ff877 /kernel/ip_set_hash_netport.c | |
parent | 13dcc23a375f61d8286072b20067fb31bcc3ad46 (diff) |
Use annotated types and fix sparse warnings
Annotated types are introduced and sparse warnings fixed.
Two warnings remained in ip_set_core.c but those are false ones.
(Patrick McHardy's review)
Diffstat (limited to 'kernel/ip_set_hash_netport.c')
-rw-r--r-- | kernel/ip_set_hash_netport.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/ip_set_hash_netport.c b/kernel/ip_set_hash_netport.c index 93cc0e8..ca17f1c 100644 --- a/kernel/ip_set_hash_netport.c +++ b/kernel/ip_set_hash_netport.c @@ -45,16 +45,16 @@ hash_netport_same_set(const struct ip_set *a, const struct ip_set *b); /* Member elements without timeout */ struct hash_netport4_elem { - u32 ip; - u16 port; + __be32 ip; + __be16 port; u8 proto; u8 cidr; }; /* Member elements with timeout support */ struct hash_netport4_telem { - u32 ip; - u16 port; + __be32 ip; + __be16 port; u8 proto; u8 cidr; unsigned long timeout; @@ -215,7 +215,7 @@ hash_netport4_uadt(struct ip_set *set, struct nlattr *head, int len, data.ip &= ip_set_netmask(data.cidr); if (tb[IPSET_ATTR_PORT]) - data.port = ip_set_get_n16(tb[IPSET_ATTR_PORT]); + data.port = nla_get_be16(tb[IPSET_ATTR_PORT]); else return -IPSET_ERR_PROTOCOL; @@ -282,14 +282,14 @@ hash_netport_same_set(const struct ip_set *a, const struct ip_set *b) struct hash_netport6_elem { union nf_inet_addr ip; - u16 port; + __be16 port; u8 proto; u8 cidr; }; struct hash_netport6_telem { union nf_inet_addr ip; - u16 port; + __be16 port; u8 proto; u8 cidr; unsigned long timeout; @@ -445,7 +445,7 @@ hash_netport6_uadt(struct ip_set *set, struct nlattr *head, int len, ip6_netmask(&data.ip, data.cidr); if (tb[IPSET_ATTR_PORT]) - data.port = ip_set_get_n16(tb[IPSET_ATTR_PORT]); + data.port = nla_get_be16(tb[IPSET_ATTR_PORT]); else return -IPSET_ERR_PROTOCOL; |