summaryrefslogtreecommitdiff
path: root/toxcore
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-05-02 15:13:10 -0400
committerirungentoo <irungentoo@gmail.com>2014-05-02 15:13:10 -0400
commitaca18f65c38c41fce73f50252d6c38c3b8fce9e5 (patch)
treebe1c9f64f34fa044aa19117745c6e49e4c6414c0 /toxcore
parent8e24771fc41597dd9e3e02a192eb0b5b43771ac1 (diff)
Small fixes.
Diffstat (limited to 'toxcore')
-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 }