mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 06:55:30 +00:00
2102. [port] Silence solaris 10 warnings.
This commit is contained in:
@@ -249,7 +249,7 @@ do { \
|
|||||||
} while (/*CONSTCOND*/0)
|
} while (/*CONSTCOND*/0)
|
||||||
|
|
||||||
#ifndef SOLARIS2
|
#ifndef SOLARIS2
|
||||||
#define ERR(err) \
|
#define SETERROR(err) \
|
||||||
do { \
|
do { \
|
||||||
/* external reference: error, and label bad */ \
|
/* external reference: error, and label bad */ \
|
||||||
error = (err); \
|
error = (err); \
|
||||||
@@ -257,7 +257,7 @@ do { \
|
|||||||
/*NOTREACHED*/ \
|
/*NOTREACHED*/ \
|
||||||
} while (/*CONSTCOND*/0)
|
} while (/*CONSTCOND*/0)
|
||||||
#else
|
#else
|
||||||
#define ERR(err) \
|
#define SETERROR(err) \
|
||||||
do { \
|
do { \
|
||||||
/* external reference: error, and label bad */ \
|
/* external reference: error, and label bad */ \
|
||||||
error = (err); \
|
error = (err); \
|
||||||
@@ -356,16 +356,16 @@ getaddrinfo(hostname, servname, hints, res)
|
|||||||
/* error check for hints */
|
/* error check for hints */
|
||||||
if (hints->ai_addrlen || hints->ai_canonname ||
|
if (hints->ai_addrlen || hints->ai_canonname ||
|
||||||
hints->ai_addr || hints->ai_next)
|
hints->ai_addr || hints->ai_next)
|
||||||
ERR(EAI_BADHINTS); /*%< xxx */
|
SETERROR(EAI_BADHINTS); /*%< xxx */
|
||||||
if (hints->ai_flags & ~AI_MASK)
|
if (hints->ai_flags & ~AI_MASK)
|
||||||
ERR(EAI_BADFLAGS);
|
SETERROR(EAI_BADFLAGS);
|
||||||
switch (hints->ai_family) {
|
switch (hints->ai_family) {
|
||||||
case PF_UNSPEC:
|
case PF_UNSPEC:
|
||||||
case PF_INET:
|
case PF_INET:
|
||||||
case PF_INET6:
|
case PF_INET6:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ERR(EAI_FAMILY);
|
SETERROR(EAI_FAMILY);
|
||||||
}
|
}
|
||||||
memcpy(pai, hints, sizeof(*pai));
|
memcpy(pai, hints, sizeof(*pai));
|
||||||
|
|
||||||
@@ -390,7 +390,7 @@ getaddrinfo(hostname, servname, hints, res)
|
|||||||
continue;
|
continue;
|
||||||
if (pai->ai_socktype == ex->e_socktype &&
|
if (pai->ai_socktype == ex->e_socktype &&
|
||||||
pai->ai_protocol != ex->e_protocol) {
|
pai->ai_protocol != ex->e_protocol) {
|
||||||
ERR(EAI_BADHINTS);
|
SETERROR(EAI_BADHINTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -410,7 +410,7 @@ getaddrinfo(hostname, servname, hints, res)
|
|||||||
case AI_ALL:
|
case AI_ALL:
|
||||||
#if 1
|
#if 1
|
||||||
/* illegal */
|
/* illegal */
|
||||||
ERR(EAI_BADFLAGS);
|
SETERROR(EAI_BADFLAGS);
|
||||||
#else
|
#else
|
||||||
pai->ai_flags &= ~(AI_ALL | AI_V4MAPPED);
|
pai->ai_flags &= ~(AI_ALL | AI_V4MAPPED);
|
||||||
break;
|
break;
|
||||||
@@ -438,7 +438,7 @@ getaddrinfo(hostname, servname, hints, res)
|
|||||||
}
|
}
|
||||||
error = get_portmatch(pai, servname);
|
error = get_portmatch(pai, servname);
|
||||||
if (error)
|
if (error)
|
||||||
ERR(error);
|
SETERROR(error);
|
||||||
|
|
||||||
*pai = ai0;
|
*pai = ai0;
|
||||||
}
|
}
|
||||||
@@ -497,9 +497,9 @@ getaddrinfo(hostname, servname, hints, res)
|
|||||||
goto good;
|
goto good;
|
||||||
|
|
||||||
if (pai->ai_flags & AI_NUMERICHOST)
|
if (pai->ai_flags & AI_NUMERICHOST)
|
||||||
ERR(EAI_NONAME);
|
SETERROR(EAI_NONAME);
|
||||||
if (hostname == NULL)
|
if (hostname == NULL)
|
||||||
ERR(EAI_NONAME);
|
SETERROR(EAI_NONAME);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* hostname as alphabetical name.
|
* hostname as alphabetical name.
|
||||||
@@ -807,7 +807,7 @@ explore_numeric(pai, hostname, servname, res)
|
|||||||
while (cur->ai_next)
|
while (cur->ai_next)
|
||||||
cur = cur->ai_next;
|
cur = cur->ai_next;
|
||||||
} else
|
} else
|
||||||
ERR(EAI_FAMILY); /*xxx*/
|
SETERROR(EAI_FAMILY); /*xxx*/
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
@@ -820,7 +820,7 @@ explore_numeric(pai, hostname, servname, res)
|
|||||||
while (cur->ai_next)
|
while (cur->ai_next)
|
||||||
cur = cur->ai_next;
|
cur = cur->ai_next;
|
||||||
} else
|
} else
|
||||||
ERR(EAI_FAMILY); /*xxx*/
|
SETERROR(EAI_FAMILY); /*xxx*/
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user