diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2012-07-26 14:12:59 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-09 14:05:45 +0100 |
commit | b666dbf819f9157a4afef2094ec961d216d802b5 (patch) | |
tree | 8adfc3059d6fc0d2e2e223244c6945e68c200c07 | |
parent | 3174f8c5045ad247563434c4b4897bd89313eafc (diff) | |
download | op-kernel-dev-b666dbf819f9157a4afef2094ec961d216d802b5.zip op-kernel-dev-b666dbf819f9157a4afef2094ec961d216d802b5.tar.gz |
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>
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index a6f0b29..855cadf 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/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); |