netfilter: ipset: Fix coding styles reported by checkpatch.pl
[firefly-linux-kernel-4.4.55.git] / net / netfilter / ipset / ip_set_hash_ipportip.c
index fc42489f87955b8f13bd8e5fb135b29e06e6e1bb..215b7b942038a63e33fe40c2df52a1e61d8c20b0 100644 (file)
@@ -63,7 +63,7 @@ hash_ipportip4_data_equal(const struct hash_ipportip4_elem *ip1,
 
 static bool
 hash_ipportip4_data_list(struct sk_buff *skb,
-                      const struct hash_ipportip4_elem *data)
+                        const struct hash_ipportip4_elem *data)
 {
        if (nla_put_ipaddr4(skb, IPSET_ATTR_IP, data->ip) ||
            nla_put_ipaddr4(skb, IPSET_ATTR_IP2, data->ip2) ||
@@ -147,8 +147,9 @@ hash_ipportip4_uadt(struct ip_set *set, struct nlattr *tb[],
 
                if (e.proto == 0)
                        return -IPSET_ERR_INVALID_PROTO;
-       } else
+       } else {
                return -IPSET_ERR_MISSING_PROTO;
+       }
 
        if (!(with_ports || e.proto == IPPROTO_ICMP))
                e.port = 0;
@@ -194,8 +195,8 @@ hash_ipportip4_uadt(struct ip_set *set, struct nlattr *tb[],
 
                        if (ret && !ip_set_eexist(ret, flags))
                                return ret;
-                       else
-                               ret = 0;
+
+                       ret = 0;
                }
        }
        return ret;
@@ -320,8 +321,9 @@ hash_ipportip6_uadt(struct ip_set *set, struct nlattr *tb[],
 
                if (e.proto == 0)
                        return -IPSET_ERR_INVALID_PROTO;
-       } else
+       } else {
                return -IPSET_ERR_MISSING_PROTO;
+       }
 
        if (!(with_ports || e.proto == IPPROTO_ICMPV6))
                e.port = 0;
@@ -344,8 +346,8 @@ hash_ipportip6_uadt(struct ip_set *set, struct nlattr *tb[],
 
                if (ret && !ip_set_eexist(ret, flags))
                        return ret;
-               else
-                       ret = 0;
+
+               ret = 0;
        }
        return ret;
 }