summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2015-08-18 14:03:41 +0100
committerPhilip Withnall <philip.withnall@collabora.co.uk>2015-08-18 14:03:41 +0100
commit6835e7b7f4a20078d508444659c636fc98e680fc (patch)
treef59ba977dd07a1ffe03f5b17a166301fa06fa663
parente1f748cccacd81cce4db338d0203dc49bc915a30 (diff)
parent6b3e59c5a670d5117ed293ae612082dcd047ba8a (diff)
downloadlibnice-6835e7b7f4a20078d508444659c636fc98e680fc.tar.gz
agent: Remove unused inet_pton() function
Summary: As spotted by Felix <felixschlitter@gmail.com>. This is a static function which is totally unused in this compilation unit and is causing build failures with `-Werror=unused-function`. Maniphest Tasks: T123 Reviewers: felixSchl, ocrete Projects: #libnice Differential Revision: https://phabricator.freedesktop.org/D221
-rw-r--r--agent/address.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/agent/address.c b/agent/address.c
index 01eebab..3c20220 100644
--- a/agent/address.c
+++ b/agent/address.c
@@ -51,7 +51,6 @@
#include "address.h"
#ifdef G_OS_WIN32
-#define inet_pton inet_pton_win32
#define inet_ntop inet_ntop_win32
/* Defined in recent versions of mingw:
@@ -86,36 +85,6 @@ inet_ntop_win32 (int af, const void *src, char *dst, socklen_t cnt)
return NULL;
}
-static int
-inet_pton_win32(int af, const char *src, void *dst)
-{
- struct addrinfo hints, *res, *ressave;
-
- memset(&hints, 0, sizeof(struct addrinfo));
- hints.ai_family = af;
-
- if (getaddrinfo(src, NULL, &hints, &res) != 0) {
- return 0;
- }
-
- ressave = res;
-
- while (res) {
- if( res->ai_addr->sa_family == AF_INET) {
- memcpy(dst, &((struct sockaddr_in *) res->ai_addr)->sin_addr,
- sizeof(struct in_addr));
- res = res->ai_next;
- } else if(res->ai_addr->sa_family == AF_INET6) {
- memcpy(dst, &((struct sockaddr_in6 *) res->ai_addr)->sin6_addr,
- sizeof(struct in_addr6));
- res = res->ai_next;
- }
- }
-
- freeaddrinfo(ressave);
- return 1;
-}
-
#endif