summaryrefslogtreecommitdiff
path: root/toxcore/TCP_connection.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2020-05-05 22:28:59 +0100
committeriphydf <iphydf@users.noreply.github.com>2020-05-05 22:56:35 +0100
commit48bd200acbf4b4d8f3fa241373477b3a21001d17 (patch)
tree732cd71532990452c9d7c07920265ed272f3e6c9 /toxcore/TCP_connection.c
parentc1a2ea3309969608a5553c34fa4199b05f20abc2 (diff)
refactor: Disallow multiple initialised declarators per decl.
We no longer allow: ```c int a = 0, b = 0; int a[3], b[3]; int a, *b; ``` But we do still allow (for now): ```c int a, b; ```
Diffstat (limited to 'toxcore/TCP_connection.c')
-rw-r--r--toxcore/TCP_connection.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/toxcore/TCP_connection.c b/toxcore/TCP_connection.c
index 4256f786..ac933cc3 100644
--- a/toxcore/TCP_connection.c
+++ b/toxcore/TCP_connection.c
@@ -692,9 +692,9 @@ static int rm_tcp_connection_from_conn(TCP_Connection_to *con_to, unsigned int t
692 */ 692 */
693static unsigned int online_tcp_connection_from_conn(TCP_Connection_to *con_to) 693static unsigned int online_tcp_connection_from_conn(TCP_Connection_to *con_to)
694{ 694{
695 unsigned int i, count = 0; 695 unsigned int count = 0;
696 696
697 for (i = 0; i < MAX_FRIEND_TCP_CONNECTIONS; ++i) { 697 for (unsigned int i = 0; i < MAX_FRIEND_TCP_CONNECTIONS; ++i) {
698 if (con_to->connections[i].tcp_connection) { 698 if (con_to->connections[i].tcp_connection) {
699 if (con_to->connections[i].status == TCP_CONNECTIONS_STATUS_ONLINE) { 699 if (con_to->connections[i].status == TCP_CONNECTIONS_STATUS_ONLINE) {
700 ++count; 700 ++count;
@@ -1086,9 +1086,9 @@ static int tcp_relay_on_online(TCP_Connections *tcp_c, int tcp_connections_numbe
1086 return -1; 1086 return -1;
1087 } 1087 }
1088 1088
1089 unsigned int i, sent = 0; 1089 unsigned int sent = 0;
1090 1090
1091 for (i = 0; i < tcp_c->connections_length; ++i) { 1091 for (unsigned int i = 0; i < tcp_c->connections_length; ++i) {
1092 TCP_Connection_to *con_to = get_connection(tcp_c, i); 1092 TCP_Connection_to *con_to = get_connection(tcp_c, i);
1093 1093
1094 if (con_to) { 1094 if (con_to) {