From cb5f3cba1f2b5dbad67bcc107f3fe4a1875cc52d Mon Sep 17 00:00:00 2001 From: Will Storey Date: Mon, 9 Oct 2017 13:14:34 -0700 Subject: Delete unused function net_ip_compare() --- src/core/network.c | 12 ------------ src/core/network.h | 3 --- 2 files changed, 15 deletions(-) diff --git a/src/core/network.c b/src/core/network.c index 4494dbc6..36e04c7a 100644 --- a/src/core/network.c +++ b/src/core/network.c @@ -60,18 +60,6 @@ IPADDR ip4_any = { #endif }; -int net_ip_compare(IPADDR *ip1, IPADDR *ip2) -{ - if (ip1->family != ip2->family) - return 0; - - if (ip1->family == AF_INET6) - return memcmp(&ip1->ip, &ip2->ip, sizeof(ip1->ip)) == 0; - - return memcmp(&ip1->ip, &ip2->ip, 4) == 0; -} - - static void sin_set_ip(union sockaddr_union *so, const IPADDR *ip) { if (ip == NULL) { diff --git a/src/core/network.h b/src/core/network.h index d1582a2e..471ab2d8 100644 --- a/src/core/network.h +++ b/src/core/network.h @@ -33,9 +33,6 @@ extern IPADDR ip4_any; GIOChannel *g_io_channel_new(int handle); -/* returns 1 if IPADDRs are the same */ -int net_ip_compare(IPADDR *ip1, IPADDR *ip2); - int net_connect_ip_handle(const IPADDR *ip, int port, const IPADDR *my_ip); /* Connect to socket */ -- cgit v1.2.3