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 6dbb6258..1dce61b2 100644
--- a/toxcore/net_crypto.c
+++ b/toxcore/net_crypto.c
@@ -385,7 +385,7 @@ static int send_data_packet(Net_Crypto *c, int crypt_connection_id, uint8_t *dat
385/* Get the lowest 2 bytes from the nonce and convert 385/* Get the lowest 2 bytes from the nonce and convert
386 * them to host byte format before returning them. 386 * them to host byte format before returning them.
387 */ 387 */
388uint16_t get_nonce_uint16(uint8_t *nonce) 388static uint16_t get_nonce_uint16(uint8_t *nonce)
389{ 389{
390 uint16_t num; 390 uint16_t num;
391 memcpy(&num, nonce + (crypto_box_NONCEBYTES - sizeof(uint16_t)), sizeof(uint16_t)); 391 memcpy(&num, nonce + (crypto_box_NONCEBYTES - sizeof(uint16_t)), sizeof(uint16_t));
@@ -618,7 +618,7 @@ static int create_crypto_connection(Net_Crypto *c)
618{ 618{
619 uint32_t i; 619 uint32_t i;
620 620
621 for (i = 0; i <= c->crypto_connections_length; ++i) { 621 for (i = 0; i < c->crypto_connections_length; ++i) {
622 if (c->crypto_connections[i].status == CRYPTO_CONN_NO_CONNECTION) 622 if (c->crypto_connections[i].status == CRYPTO_CONN_NO_CONNECTION)
623 return i; 623 return i;
624 } 624 }