提交 b666dbf8 编写于 作者: P Philipp Reisner

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: NPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
上级 3174f8c5
......@@ -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);
ok = drbd_socket_okay(&sock.socket);
ok = drbd_socket_okay(&msock.socket) && ok;
} while (!ok);
if (ad.s_listen)
sock_release(ad.s_listen);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册