From 491d03c229d5fe684a38bac2abc4ef2617da2bba Mon Sep 17 00:00:00 2001 From: Diadlo Date: Fri, 3 Mar 2017 21:21:25 +0300 Subject: Remove useless 'to_net_family' and 'to_host_family' --- toxcore/DHT.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'toxcore/DHT.c') diff --git a/toxcore/DHT.c b/toxcore/DHT.c index eb1e1a5e..a4b97fb8 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c @@ -256,30 +256,6 @@ int handle_request(const uint8_t *self_public_key, const uint8_t *self_secret_ke return len1; } -void to_net_family(IP *ip) -{ - if (ip->family == TOX_AF_INET) { - ip->family = TOX_AF_INET; - } else if (ip->family == TOX_AF_INET6) { - ip->family = TOX_AF_INET6; - } -} - -int to_host_family(IP *ip) -{ - if (ip->family == TOX_AF_INET) { - ip->family = TOX_AF_INET; - return 0; - } - - if (ip->family == TOX_AF_INET6) { - ip->family = TOX_AF_INET6; - return 0; - } - - return -1; -} - #define PACKED_NODE_SIZE_IP4 (1 + SIZE_IP4 + sizeof(uint16_t) + CRYPTO_PUBLIC_KEY_SIZE) #define PACKED_NODE_SIZE_IP6 (1 + SIZE_IP6 + sizeof(uint16_t) + CRYPTO_PUBLIC_KEY_SIZE) -- cgit v1.2.3