From aca18f65c38c41fce73f50252d6c38c3b8fce9e5 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Fri, 2 May 2014 15:13:10 -0400 Subject: Small fixes. --- toxcore/net_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toxcore') 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 /* Get the lowest 2 bytes from the nonce and convert * them to host byte format before returning them. */ -uint16_t get_nonce_uint16(uint8_t *nonce) +static uint16_t get_nonce_uint16(uint8_t *nonce) { uint16_t num; memcpy(&num, nonce + (crypto_box_NONCEBYTES - sizeof(uint16_t)), sizeof(uint16_t)); @@ -618,7 +618,7 @@ static int create_crypto_connection(Net_Crypto *c) { uint32_t i; - for (i = 0; i <= c->crypto_connections_length; ++i) { + for (i = 0; i < c->crypto_connections_length; ++i) { if (c->crypto_connections[i].status == CRYPTO_CONN_NO_CONNECTION) return i; } -- cgit v1.2.3