summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/net_crypto.c')
-rw-r--r--toxcore/net_crypto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/net_crypto.c b/toxcore/net_crypto.c
index 1de32cb0..a2e42557 100644
--- a/toxcore/net_crypto.c
+++ b/toxcore/net_crypto.c
@@ -456,7 +456,7 @@ int crypto_connect(Net_Crypto *c, uint8_t *public_key, IP_Port ip_port)
456 } 456 }
457 457
458 if (realloc_cryptoconnection(c, c->crypto_connections_length + 1) == -1 458 if (realloc_cryptoconnection(c, c->crypto_connections_length + 1) == -1
459 || c->crypto_connections == NULL) 459 || c->crypto_connections == NULL)
460 return -1; 460 return -1;
461 461
462 memset(&(c->crypto_connections[c->crypto_connections_length]), 0, sizeof(Crypto_Connection)); 462 memset(&(c->crypto_connections[c->crypto_connections_length]), 0, sizeof(Crypto_Connection));
@@ -580,7 +580,7 @@ int accept_crypto_inbound(Net_Crypto *c, int connection_id, uint8_t *public_key,
580 * } 580 * }
581 */ 581 */
582 if (realloc_cryptoconnection(c, c->crypto_connections_length + 1) == -1 582 if (realloc_cryptoconnection(c, c->crypto_connections_length + 1) == -1
583 || c->crypto_connections == NULL) 583 || c->crypto_connections == NULL)
584 return -1; 584 return -1;
585 585
586 memset(&(c->crypto_connections[c->crypto_connections_length]), 0, sizeof(Crypto_Connection)); 586 memset(&(c->crypto_connections[c->crypto_connections_length]), 0, sizeof(Crypto_Connection));