diff options
author | iphydf <iphydf@users.noreply.github.com> | 2017-01-20 21:16:55 +0000 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2017-01-28 20:49:12 +0000 |
commit | 6ae33c16cf9e37fda85d70c78b3c2779eb8ca21a (patch) | |
tree | 99c3a8c26e02039b515bb6f57d2797d1cdf77c1d /toxcore/TCP_connection.c | |
parent | 895de7ef26e7617769f2271345e414545c2581f8 (diff) |
Add VLA compatibility macro for C89-ish compilers.
Diffstat (limited to 'toxcore/TCP_connection.c')
-rw-r--r-- | toxcore/TCP_connection.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/toxcore/TCP_connection.c b/toxcore/TCP_connection.c index 904b686e..18c1e76e 100644 --- a/toxcore/TCP_connection.c +++ b/toxcore/TCP_connection.c | |||
@@ -1436,7 +1436,10 @@ static void kill_nonused_tcp(TCP_Connections *tcp_c) | |||
1436 | return; | 1436 | return; |
1437 | } | 1437 | } |
1438 | 1438 | ||
1439 | unsigned int i, num_online = 0, num_kill = 0, to_kill[tcp_c->tcp_connections_length]; | 1439 | unsigned int i; |
1440 | unsigned int num_online = 0; | ||
1441 | unsigned int num_kill = 0; | ||
1442 | VLA(unsigned int, to_kill, tcp_c->tcp_connections_length); | ||
1440 | 1443 | ||
1441 | for (i = 0; i < tcp_c->tcp_connections_length; ++i) { | 1444 | for (i = 0; i < tcp_c->tcp_connections_length; ++i) { |
1442 | TCP_con *tcp_con = get_tcp_connection(tcp_c, i); | 1445 | TCP_con *tcp_con = get_tcp_connection(tcp_c, i); |