Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b666dbf8 authored by Philipp Reisner's avatar Philipp Reisner
Browse files

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: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 3174f8c5
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -985,13 +985,9 @@ static int conn_connect(struct drbd_tconn *tconn)
				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);
	} while (!ok);

	if (ad.s_listen)
		sock_release(ad.s_listen);