net/ipv4: Move && and || to end of previous line
[deliverable/linux.git] / net / ipv4 / udp.c
index 1eaf57567ebf0ba39a6d276b889cd7f597a3bd2c..1f9534846ca9a3b457e00266cd84ba7b2cb42450 100644 (file)
@@ -136,12 +136,12 @@ static int udp_lib_lport_inuse(struct net *net, __u16 num,
        struct hlist_nulls_node *node;
 
        sk_nulls_for_each(sk2, node, &hslot->head)
-               if (net_eq(sock_net(sk2), net)                  &&
-                   sk2 != sk                                   &&
+               if (net_eq(sock_net(sk2), net) &&
+                   sk2 != sk &&
                    (bitmap || udp_sk(sk2)->udp_port_hash == num) &&
-                   (!sk2->sk_reuse || !sk->sk_reuse)           &&
-                   (!sk2->sk_bound_dev_if || !sk->sk_bound_dev_if
-                       || sk2->sk_bound_dev_if == sk->sk_bound_dev_if) &&
+                   (!sk2->sk_reuse || !sk->sk_reuse) &&
+                   (!sk2->sk_bound_dev_if || !sk->sk_bound_dev_if ||
+                    sk2->sk_bound_dev_if == sk->sk_bound_dev_if) &&
                    (*saddr_comp)(sk, sk2)) {
                        if (bitmap)
                                __set_bit(udp_sk(sk2)->udp_port_hash >> log,
@@ -168,12 +168,12 @@ static int udp_lib_lport_inuse2(struct net *net, __u16 num,
 
        spin_lock(&hslot2->lock);
        udp_portaddr_for_each_entry(sk2, node, &hslot2->head)
-               if (net_eq(sock_net(sk2), net)                  &&
-                   sk2 != sk                                   &&
-                   (udp_sk(sk2)->udp_port_hash == num)         &&
-                   (!sk2->sk_reuse || !sk->sk_reuse)           &&
-                   (!sk2->sk_bound_dev_if || !sk->sk_bound_dev_if
-                       || sk2->sk_bound_dev_if == sk->sk_bound_dev_if) &&
+               if (net_eq(sock_net(sk2), net) &&
+                   sk2 != sk &&
+                   (udp_sk(sk2)->udp_port_hash == num) &&
+                   (!sk2->sk_reuse || !sk->sk_reuse) &&
+                   (!sk2->sk_bound_dev_if || !sk->sk_bound_dev_if ||
+                    sk2->sk_bound_dev_if == sk->sk_bound_dev_if) &&
                    (*saddr_comp)(sk, sk2)) {
                        res = 1;
                        break;
@@ -545,13 +545,13 @@ static inline struct sock *udp_v4_mcast_next(struct net *net, struct sock *sk,
        sk_nulls_for_each_from(s, node) {
                struct inet_sock *inet = inet_sk(s);
 
-               if (!net_eq(sock_net(s), net)                           ||
-                   udp_sk(s)->udp_port_hash != hnum                    ||
-                   (inet->inet_daddr && inet->inet_daddr != rmt_addr)  ||
-                   (inet->inet_dport != rmt_port && inet->inet_dport)  ||
-                   (inet->inet_rcv_saddr       &&
-                    inet->inet_rcv_saddr != loc_addr)                  ||
-                   ipv6_only_sock(s)                                   ||
+               if (!net_eq(sock_net(s), net) ||
+                   udp_sk(s)->udp_port_hash != hnum ||
+                   (inet->inet_daddr && inet->inet_daddr != rmt_addr) ||
+                   (inet->inet_dport != rmt_port && inet->inet_dport) ||
+                   (inet->inet_rcv_saddr &&
+                    inet->inet_rcv_saddr != loc_addr) ||
+                   ipv6_only_sock(s) ||
                    (s->sk_bound_dev_if && s->sk_bound_dev_if != dif))
                        continue;
                if (!ip_mc_sf_allow(s, loc_addr, rmt_addr, dif))
This page took 0.031655 seconds and 5 git commands to generate.