Commit b4c798cf695dc7cee9798a686128461ad0070115

Authored by Xue Ying
Committed by David Teigland
1 parent 475f230c60

dlm: remove redundant variable assignments

Once the tcp_create_listen_sock() is returned successfully, we
will invoke add_sock() immediately. In add_sock(), the 'con'
variable is assigned to 'sk_user_data', meanwhile, the 'sock' is
also set to 'con->sock'. So it's unnecessary to do the same thing
in tcp_create_listen_sock().

Signed-off-by: Xue Ying <ying.xue@windriver.com>
Signed-off-by: David Teigland <teigland@redhat.com>

Showing 1 changed file with 0 additions and 2 deletions Side-by-side Diff

... ... @@ -1175,10 +1175,8 @@
1175 1175 if (result < 0) {
1176 1176 log_print("Failed to set SO_REUSEADDR on socket: %d", result);
1177 1177 }
1178   - sock->sk->sk_user_data = con;
1179 1178 con->rx_action = tcp_accept_from_sock;
1180 1179 con->connect_action = tcp_connect_to_sock;
1181   - con->sock = sock;
1182 1180  
1183 1181 /* Bind to our port */
1184 1182 make_sockaddr(saddr, dlm_config.ci_tcp_port, &addr_len);