Small cleanups.

This commit is contained in:
irungentoo 2015-05-02 21:55:42 -04:00
parent a01a05a943
commit 0045ace8a8
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98
3 changed files with 4 additions and 4 deletions

View File

@ -145,7 +145,7 @@ void get_shared_key(Shared_Keys *shared_keys, uint8_t *shared_key, const uint8_t
*/ */
void DHT_get_shared_key_recv(DHT *dht, uint8_t *shared_key, const uint8_t *client_id) void DHT_get_shared_key_recv(DHT *dht, uint8_t *shared_key, const uint8_t *client_id)
{ {
return get_shared_key(&dht->shared_keys_recv, shared_key, dht->self_secret_key, client_id); get_shared_key(&dht->shared_keys_recv, shared_key, dht->self_secret_key, client_id);
} }
/* Copy shared_key to encrypt/decrypt DHT packet from client_id into shared_key /* Copy shared_key to encrypt/decrypt DHT packet from client_id into shared_key
@ -153,7 +153,7 @@ void DHT_get_shared_key_recv(DHT *dht, uint8_t *shared_key, const uint8_t *clien
*/ */
void DHT_get_shared_key_sent(DHT *dht, uint8_t *shared_key, const uint8_t *client_id) void DHT_get_shared_key_sent(DHT *dht, uint8_t *shared_key, const uint8_t *client_id)
{ {
return get_shared_key(&dht->shared_keys_sent, shared_key, dht->self_secret_key, client_id); get_shared_key(&dht->shared_keys_sent, shared_key, dht->self_secret_key, client_id);
} }
void to_net_family(IP *ip) void to_net_family(IP *ip)

View File

@ -85,7 +85,7 @@ typedef struct TCP_Priority_List TCP_Priority_List;
struct TCP_Priority_List { struct TCP_Priority_List {
TCP_Priority_List *next; TCP_Priority_List *next;
uint16_t size, sent; uint16_t size, sent;
uint8_t data[0]; uint8_t data[];
}; };
typedef struct TCP_Secure_Connection { typedef struct TCP_Secure_Connection {

View File

@ -813,7 +813,7 @@ void ipport_copy(IP_Port *target, const IP_Port *source)
return; return;
memcpy(target, source, sizeof(IP_Port)); memcpy(target, source, sizeof(IP_Port));
}; }
/* ip_ntoa /* ip_ntoa
* converts ip into a string * converts ip into a string