summaryrefslogtreecommitdiff
path: root/pr/src/misc/prnetdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'pr/src/misc/prnetdb.c')
-rw-r--r--pr/src/misc/prnetdb.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/pr/src/misc/prnetdb.c b/pr/src/misc/prnetdb.c
index 76a1f1e3..923e75f9 100644
--- a/pr/src/misc/prnetdb.c
+++ b/pr/src/misc/prnetdb.c
@@ -97,7 +97,7 @@ extern PRBool _pr_ipv6_is_present(void);
((a)->pr_s6_addr32[1] == 0) && \
((a)->pr_s6_addr32[2] == 0) && \
((a)->pr_s6_addr32[3] == 0))
-
+
#define _PR_IN6_IS_ADDR_LOOPBACK(a) \
(((a)->pr_s6_addr32[0] == 0) && \
((a)->pr_s6_addr32[1] == 0) && \
@@ -106,7 +106,7 @@ extern PRBool _pr_ipv6_is_present(void);
((a)->pr_s6_addr[13] == 0) && \
((a)->pr_s6_addr[14] == 0) && \
((a)->pr_s6_addr[15] == 0x1U))
-
+
const PRIPv6Addr _pr_in6addr_any = {{{ 0, 0, 0, 0,
0, 0, 0, 0,
0, 0, 0, 0,
@@ -263,13 +263,13 @@ _pr_QueryNetIfs(void)
struct sockaddr_in *sin = (struct sockaddr_in *) sa;
if (sin->sin_addr.s_addr != htonl(INADDR_LOOPBACK)) {
_pr_have_inet_if = PR_TRUE;
- }
+ }
} else if (sa->sa_family == AF_INET6) {
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa;
if (!IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr)
&& !IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) {
_pr_have_inet6_if = PR_TRUE;
- }
+ }
}
#ifdef _PR_HAVE_SOCKADDR_LEN
@@ -352,15 +352,15 @@ _pr_QueryNetIfs(void)
struct sockaddr_in *sin = (struct sockaddr_in *) sa;
if (sin->sin_addr.s_addr != htonl(INADDR_LOOPBACK)) {
_pr_have_inet_if = 1;
- }
+ }
} else if (sa->sa_family == AF_INET6) {
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) sa;
if (!IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr)
&& !IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) {
_pr_have_inet6_if = 1;
- }
+ }
}
- }
+ }
freeifaddrs(ifp);
}
@@ -604,7 +604,7 @@ static PRStatus CopyProtoent(
* #################################################################
* NOTE: tmphe, tmpbuf, bufsize, h, and h_err are local variables
* or arguments of PR_GetHostByName, PR_GetIPNodeByName, and
- * PR_GetHostByAddr. DO NOT CHANGE THE NAMES OF THESE LOCAL
+ * PR_GetHostByAddr. DO NOT CHANGE THE NAMES OF THESE LOCAL
* VARIABLES OR ARGUMENTS.
* #################################################################
*/
@@ -665,7 +665,7 @@ PR_IMPLEMENT(PRStatus) PR_GetHostByName(
LOCK_DNS();
h = GETHOSTBYNAME(name);
-
+
if (NULL == h)
{
PR_SetError(PR_DIRECTORY_LOOKUP_ERROR, _MD_GETHOST_ERRNO());
@@ -703,7 +703,7 @@ static void * _pr_freehostent_fp;
PRStatus
_pr_find_getipnodebyname(void)
{
- PRLibrary *lib;
+ PRLibrary *lib;
PRStatus rv;
#define GETIPNODEBYNAME "getipnodebyname"
#define GETIPNODEBYADDR "getipnodebyaddr"
@@ -740,7 +740,7 @@ static PRStatus AppendV4AddrsToHostent(
PRIntn na, na_old;
char **ap;
char **new_addr_list;
-
+
/* Count the addresses, then grow storage for the pointers */
for (na_old = 0, ap = to->h_addr_list; *ap != 0; na_old++, ap++)
{;} /* nothing to execute */
@@ -851,7 +851,7 @@ PR_IMPLEMENT(PRStatus) PR_GetIPNodeByName(
#ifdef _PR_INET6_PROBE
if (_pr_ipv6_is_present())
#endif
- h = GETHOSTBYNAME2(name, AF_INET6);
+ h = GETHOSTBYNAME2(name, AF_INET6);
}
if ((NULL == h) && (flags & PR_AI_V4MAPPED)
&& ((flags & PR_AI_ADDRCONFIG) == 0 || _pr_have_inet_if))
@@ -890,7 +890,7 @@ PR_IMPLEMENT(PRStatus) PR_GetIPNodeByName(
LOCK_DNS();
h = GETHOSTBYNAME(name);
#endif /* _PR_INET6 */
-
+
if (NULL == h)
{
#if defined(_PR_INET6) && defined(_PR_HAVE_GETIPNODEBYNAME)
@@ -1565,7 +1565,7 @@ static int StringToV6Addr(const char *string, PRIPv6Addr *addr)
}
addr->pr_s6_addr16[section++] = htons((unsigned short)val);
}
-
+
if (*s == '.') {
/* Have a trailing v4 format address */
if (section > 6) return 0; /* not enough room */
@@ -1611,13 +1611,13 @@ static int StringToV6Addr(const char *string, PRIPv6Addr *addr)
addr->pr_s6_addr[2 * section + 1] = val;
section++;
}
-
+
if (double_colon != -1) {
/* Stretch the double colon */
int tosection;
int ncopy = section - double_colon;
for (tosection = 7; ncopy--; tosection--) {
- addr->pr_s6_addr16[tosection] =
+ addr->pr_s6_addr16[tosection] =
addr->pr_s6_addr16[double_colon + ncopy];
}
while (tosection >= double_colon) {
@@ -1734,7 +1734,7 @@ static const char *V6AddrToString(
}
STUFF('\0');
return bufcopy;
-#undef STUFF
+#undef STUFF
}
#endif /* !_PR_HAVE_INET_NTOP */
@@ -1814,7 +1814,7 @@ typedef struct addrinfo PRADDRINFO;
typedef struct addrinfo PRADDRINFO;
-/* getaddrinfo/freeaddrinfo/getnameinfo prototypes */
+/* getaddrinfo/freeaddrinfo/getnameinfo prototypes */
#if defined(WIN32)
#define FUNC_MODIFIER __stdcall
#else
@@ -1911,7 +1911,7 @@ _pr_find_getaddrinfo(void)
#if !defined(_PR_HAVE_GETADDRINFO) || defined(_PR_INET6_PROBE)
/*
* If getaddrinfo does not exist, then we will fall back on
- * PR_GetHostByName, which requires that we allocate a buffer for the
+ * PR_GetHostByName, which requires that we allocate a buffer for the
* PRHostEnt data structure and its members.
*/
typedef struct PRAddrInfoFB {
@@ -1979,11 +1979,11 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInfoByName(const char *hostname,
if (!(flags & PR_AI_NOCANONNAME))
hints.ai_flags |= AI_CANONNAME;
#ifdef AI_ADDRCONFIG
- /*
+ /*
* Propagate AI_ADDRCONFIG to the GETADDRINFO call if PR_AI_ADDRCONFIG
* is set.
- *
- * Need a workaround for loopback host addresses:
+ *
+ * Need a workaround for loopback host addresses:
* The problem is that in glibc and Windows, AI_ADDRCONFIG applies the
* existence of an outgoing network interface to IP addresses of the
* loopback interface, due to a strict interpretation of the
@@ -2104,7 +2104,7 @@ PR_IMPLEMENT(const char *) PR_GetCanonNameFromAddrInfo(const PRAddrInfo *ai)
if (!_pr_ipv6_is_present()) {
const PRAddrInfoFB *fb = (const PRAddrInfoFB *) ai;
return fb->has_cname ? fb->hostent.h_name : NULL;
- }
+ }
#endif
return ((const PRADDRINFO *) ai)->ai_canonname;
#else