summaryrefslogtreecommitdiff
path: root/toxcore/TCP_connection.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-01-10 13:39:07 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-01-10 18:57:37 +0000
commit54ec162558f203242639b382eea6e0085300249c (patch)
tree5321d67bbc143ea3caa4e9e9048ffc71e40b0c14 /toxcore/TCP_connection.c
parenta3079e82ddda90055d7247f000a8e9afa7f8a5c5 (diff)
Fix formatting in some C files.
Also replace &(x) with &x for consistency.
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 25159491..fd7e073c 100644
--- a/toxcore/TCP_connection.c
+++ b/toxcore/TCP_connection.c
@@ -144,7 +144,7 @@ static int create_connection(TCP_Connections *tcp_c)
144 temp_pointer) == 0) { 144 temp_pointer) == 0) {
145 id = tcp_c->connections_length; 145 id = tcp_c->connections_length;
146 ++tcp_c->connections_length; 146 ++tcp_c->connections_length;
147 memset(&(tcp_c->connections[id]), 0, sizeof(TCP_Connection_to)); 147 memset(&tcp_c->connections[id], 0, sizeof(TCP_Connection_to));
148 } 148 }
149 149
150 return id; 150 return id;
@@ -172,7 +172,7 @@ static int create_tcp_connection(TCP_Connections *tcp_c)
172 if (realloc_tox_array(tcp_c->tcp_connections, TCP_con, tcp_c->tcp_connections_length + 1, temp_pointer) == 0) { 172 if (realloc_tox_array(tcp_c->tcp_connections, TCP_con, tcp_c->tcp_connections_length + 1, temp_pointer) == 0) {
173 id = tcp_c->tcp_connections_length; 173 id = tcp_c->tcp_connections_length;
174 ++tcp_c->tcp_connections_length; 174 ++tcp_c->tcp_connections_length;
175 memset(&(tcp_c->tcp_connections[id]), 0, sizeof(TCP_con)); 175 memset(&tcp_c->tcp_connections[id], 0, sizeof(TCP_con));
176 } 176 }
177 177
178 return id; 178 return id;
@@ -190,7 +190,7 @@ static int wipe_connection(TCP_Connections *tcp_c, int connections_number)
190 } 190 }
191 191
192 uint32_t i; 192 uint32_t i;
193 memset(&(tcp_c->connections[connections_number]), 0 , sizeof(TCP_Connection_to)); 193 memset(&tcp_c->connections[connections_number], 0, sizeof(TCP_Connection_to));
194 194
195 for (i = tcp_c->connections_length; i != 0; --i) { 195 for (i = tcp_c->connections_length; i != 0; --i) {
196 if (tcp_c->connections[i - 1].status != TCP_CONN_NONE) { 196 if (tcp_c->connections[i - 1].status != TCP_CONN_NONE) {
@@ -219,7 +219,7 @@ static int wipe_tcp_connection(TCP_Connections *tcp_c, int tcp_connections_numbe
219 } 219 }
220 220
221 uint32_t i; 221 uint32_t i;
222 memset(&(tcp_c->tcp_connections[tcp_connections_number]), 0 , sizeof(TCP_con)); 222 memset(&tcp_c->tcp_connections[tcp_connections_number], 0, sizeof(TCP_con));
223 223
224 for (i = tcp_c->tcp_connections_length; i != 0; --i) { 224 for (i = tcp_c->tcp_connections_length; i != 0; --i) {
225 if (tcp_c->tcp_connections[i - 1].status != TCP_CONN_NONE) { 225 if (tcp_c->tcp_connections[i - 1].status != TCP_CONN_NONE) {