aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-03-24 18:58:53 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-24 21:16:29 -0400
commit0980c1e3084572b1d6c35ace5d795cf68b7ae409 (patch)
tree9c78de509a715ea934b1bea2e304eec0485404f1 /net/ipv4
parent80f03e27a309f3e32ebdd9629ac0320005a2180b (diff)
tcp: use C99 initializers in new_state[]
Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 62f38428279a..dbd51cefaf02 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1913,18 +1913,19 @@ EXPORT_SYMBOL_GPL(tcp_set_state);
1913 1913
1914static const unsigned char new_state[16] = { 1914static const unsigned char new_state[16] = {
1915 /* current state: new state: action: */ 1915 /* current state: new state: action: */
1916 /* (Invalid) */ TCP_CLOSE, 1916 [0 /* (Invalid) */] = TCP_CLOSE,
1917 /* TCP_ESTABLISHED */ TCP_FIN_WAIT1 | TCP_ACTION_FIN, 1917 [TCP_ESTABLISHED] = TCP_FIN_WAIT1 | TCP_ACTION_FIN,
1918 /* TCP_SYN_SENT */ TCP_CLOSE, 1918 [TCP_SYN_SENT] = TCP_CLOSE,
1919 /* TCP_SYN_RECV */ TCP_FIN_WAIT1 | TCP_ACTION_FIN, 1919 [TCP_SYN_RECV] = TCP_FIN_WAIT1 | TCP_ACTION_FIN,
1920 /* TCP_FIN_WAIT1 */ TCP_FIN_WAIT1, 1920 [TCP_FIN_WAIT1] = TCP_FIN_WAIT1,
1921 /* TCP_FIN_WAIT2 */ TCP_FIN_WAIT2, 1921 [TCP_FIN_WAIT2] = TCP_FIN_WAIT2,
1922 /* TCP_TIME_WAIT */ TCP_CLOSE, 1922 [TCP_TIME_WAIT] = TCP_CLOSE,
1923 /* TCP_CLOSE */ TCP_CLOSE, 1923 [TCP_CLOSE] = TCP_CLOSE,
1924 /* TCP_CLOSE_WAIT */ TCP_LAST_ACK | TCP_ACTION_FIN, 1924 [TCP_CLOSE_WAIT] = TCP_LAST_ACK | TCP_ACTION_FIN,
1925 /* TCP_LAST_ACK */ TCP_LAST_ACK, 1925 [TCP_LAST_ACK] = TCP_LAST_ACK,
1926 /* TCP_LISTEN */ TCP_CLOSE, 1926 [TCP_LISTEN] = TCP_CLOSE,
1927 /* TCP_CLOSING */ TCP_CLOSING, 1927 [TCP_CLOSING] = TCP_CLOSING,
1928 [TCP_NEW_SYN_RECV] = TCP_CLOSE, /* should not happen ! */
1928}; 1929};
1929 1930
1930static int tcp_close_state(struct sock *sk) 1931static int tcp_close_state(struct sock *sk)