diff options
author | Eric Dumazet <edumazet@google.com> | 2015-03-24 18:58:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-24 21:16:29 -0400 |
commit | 0980c1e3084572b1d6c35ace5d795cf68b7ae409 (patch) | |
tree | 9c78de509a715ea934b1bea2e304eec0485404f1 /net/ipv4 | |
parent | 80f03e27a309f3e32ebdd9629ac0320005a2180b (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.c | 25 |
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 | ||
1914 | static const unsigned char new_state[16] = { | 1914 | static 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 | ||
1930 | static int tcp_close_state(struct sock *sk) | 1931 | static int tcp_close_state(struct sock *sk) |