Browse Source

drbd: Remove redundant and wrong test for NULL simplification in conn_connect()

Since the drbd_socket_okay() function itself tests if the the
socket is NULL, the explicit test "if (sock.socket && &msock.socket)"
was redundent.
Apart from that the address opperator ('&') before msock.socket rendered
the test pointless.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Philipp Reisner 13 years ago
parent
commit
b666dbf819
1 changed files with 3 additions and 7 deletions
  1. 3 7
      drivers/block/drbd/drbd_receiver.c

+ 3 - 7
drivers/block/drbd/drbd_receiver.c

@@ -985,13 +985,9 @@ retry:
 				goto out_release_sockets;
 		}
 
-		if (sock.socket && &msock.socket) {
-			ok = drbd_socket_okay(&sock.socket);
-			ok = drbd_socket_okay(&msock.socket) && ok;
-			if (ok)
-				break;
-		}
-	} while (1);
+		ok = drbd_socket_okay(&sock.socket);
+		ok = drbd_socket_okay(&msock.socket) && ok;
+	} while (!ok);
 
 	if (ad.s_listen)
 		sock_release(ad.s_listen);