2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-17 09:43:59 +08:00

tcp: use C99 initializers in new_state[]

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet 2015-03-24 15:58:53 -07:00 committed by David S. Miller
parent 80f03e27a3
commit 0980c1e308

View File

@ -1913,18 +1913,19 @@ EXPORT_SYMBOL_GPL(tcp_set_state);
static const unsigned char new_state[16] = { static const unsigned char new_state[16] = {
/* current state: new state: action: */ /* current state: new state: action: */
/* (Invalid) */ TCP_CLOSE, [0 /* (Invalid) */] = TCP_CLOSE,
/* TCP_ESTABLISHED */ TCP_FIN_WAIT1 | TCP_ACTION_FIN, [TCP_ESTABLISHED] = TCP_FIN_WAIT1 | TCP_ACTION_FIN,
/* TCP_SYN_SENT */ TCP_CLOSE, [TCP_SYN_SENT] = TCP_CLOSE,
/* TCP_SYN_RECV */ TCP_FIN_WAIT1 | TCP_ACTION_FIN, [TCP_SYN_RECV] = TCP_FIN_WAIT1 | TCP_ACTION_FIN,
/* TCP_FIN_WAIT1 */ TCP_FIN_WAIT1, [TCP_FIN_WAIT1] = TCP_FIN_WAIT1,
/* TCP_FIN_WAIT2 */ TCP_FIN_WAIT2, [TCP_FIN_WAIT2] = TCP_FIN_WAIT2,
/* TCP_TIME_WAIT */ TCP_CLOSE, [TCP_TIME_WAIT] = TCP_CLOSE,
/* TCP_CLOSE */ TCP_CLOSE, [TCP_CLOSE] = TCP_CLOSE,
/* TCP_CLOSE_WAIT */ TCP_LAST_ACK | TCP_ACTION_FIN, [TCP_CLOSE_WAIT] = TCP_LAST_ACK | TCP_ACTION_FIN,
/* TCP_LAST_ACK */ TCP_LAST_ACK, [TCP_LAST_ACK] = TCP_LAST_ACK,
/* TCP_LISTEN */ TCP_CLOSE, [TCP_LISTEN] = TCP_CLOSE,
/* TCP_CLOSING */ TCP_CLOSING, [TCP_CLOSING] = TCP_CLOSING,
[TCP_NEW_SYN_RECV] = TCP_CLOSE, /* should not happen ! */
}; };
static int tcp_close_state(struct sock *sk) static int tcp_close_state(struct sock *sk)