From c2d28607e25b8884ffb893ab4bc6cbb3b1c5a386 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Thu, 20 Jan 2011 10:20:14 +0100 Subject: Fix the placement style of boolean operators at continued lines Fix "&&" and "||" continuation style (Patrick McHardy's review) --- kernel/ip_set_hash_ipport.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'kernel/ip_set_hash_ipport.c') diff --git a/kernel/ip_set_hash_ipport.c b/kernel/ip_set_hash_ipport.c index 891d045..6953042 100644 --- a/kernel/ip_set_hash_ipport.c +++ b/kernel/ip_set_hash_ipport.c @@ -66,9 +66,9 @@ static inline bool hash_ipport4_data_equal(const struct hash_ipport4_elem *ip1, const struct hash_ipport4_elem *ip2) { - return ip1->ip == ip2->ip - && ip1->port == ip2->port - && ip1->proto == ip2->proto; + return ip1->ip == ip2->ip && + ip1->port == ip2->port && + ip1->proto == ip2->proto; } static inline bool @@ -218,10 +218,10 @@ hash_ipport4_uadt(struct ip_set *set, struct nlattr *head, int len, timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]); } - if (adt == IPSET_TEST - || !(data.proto == IPPROTO_TCP || data.proto == IPPROTO_UDP) - || !(tb[IPSET_ATTR_IP_TO] || tb[IPSET_ATTR_CIDR] - || tb[IPSET_ATTR_PORT_TO])) { + if (adt == IPSET_TEST || + !(data.proto == IPPROTO_TCP || data.proto == IPPROTO_UDP) || + !(tb[IPSET_ATTR_IP_TO] || tb[IPSET_ATTR_CIDR] || + tb[IPSET_ATTR_PORT_TO])) { ret = adtfn(set, &data, timeout); return ip_set_eexist(ret, flags) ? 0 : ret; } @@ -273,8 +273,8 @@ hash_ipport_same_set(const struct ip_set *a, const struct ip_set *b) const struct ip_set_hash *y = b->data; /* Resizing changes htable_bits, so we ignore it */ - return x->maxelem == y->maxelem - && x->timeout == y->timeout; + return x->maxelem == y->maxelem && + x->timeout == y->timeout; } /* The type variant functions: IPv6 */ @@ -298,9 +298,9 @@ static inline bool hash_ipport6_data_equal(const struct hash_ipport6_elem *ip1, const struct hash_ipport6_elem *ip2) { - return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0 - && ip1->port == ip2->port - && ip1->proto == ip2->proto; + return ipv6_addr_cmp(&ip1->ip.in6, &ip2->ip.in6) == 0 && + ip1->port == ip2->port && + ip1->proto == ip2->proto; } static inline bool @@ -440,9 +440,9 @@ hash_ipport6_uadt(struct ip_set *set, struct nlattr *head, int len, timeout = ip_set_timeout_uget(tb[IPSET_ATTR_TIMEOUT]); } - if (adt == IPSET_TEST - || !(data.proto == IPPROTO_TCP || data.proto == IPPROTO_UDP) - || !tb[IPSET_ATTR_PORT_TO]) { + if (adt == IPSET_TEST || + !(data.proto == IPPROTO_TCP || data.proto == IPPROTO_UDP) || + !tb[IPSET_ATTR_PORT_TO]) { ret = adtfn(set, &data, timeout); return ip_set_eexist(ret, flags) ? 0 : ret; } -- cgit v1.2.3