From f0da7dc4bc8404fff8f6d720ad504e58e335fdb8 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 13 Nov 2006 05:00:56 +0000 Subject: [PATCH] 2102. [port] Silence solaris 10 warnings. --- lib/bind/irs/getaddrinfo.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/bind/irs/getaddrinfo.c b/lib/bind/irs/getaddrinfo.c index e27037c9a2..1839ba48e1 100644 --- a/lib/bind/irs/getaddrinfo.c +++ b/lib/bind/irs/getaddrinfo.c @@ -249,7 +249,7 @@ do { \ } while (/*CONSTCOND*/0) #ifndef SOLARIS2 -#define ERR(err) \ +#define SETERROR(err) \ do { \ /* external reference: error, and label bad */ \ error = (err); \ @@ -257,7 +257,7 @@ do { \ /*NOTREACHED*/ \ } while (/*CONSTCOND*/0) #else -#define ERR(err) \ +#define SETERROR(err) \ do { \ /* external reference: error, and label bad */ \ error = (err); \ @@ -356,16 +356,16 @@ getaddrinfo(hostname, servname, hints, res) /* error check for hints */ if (hints->ai_addrlen || hints->ai_canonname || hints->ai_addr || hints->ai_next) - ERR(EAI_BADHINTS); /*%< xxx */ + SETERROR(EAI_BADHINTS); /*%< xxx */ if (hints->ai_flags & ~AI_MASK) - ERR(EAI_BADFLAGS); + SETERROR(EAI_BADFLAGS); switch (hints->ai_family) { case PF_UNSPEC: case PF_INET: case PF_INET6: break; default: - ERR(EAI_FAMILY); + SETERROR(EAI_FAMILY); } memcpy(pai, hints, sizeof(*pai)); @@ -390,7 +390,7 @@ getaddrinfo(hostname, servname, hints, res) continue; if (pai->ai_socktype == ex->e_socktype && pai->ai_protocol != ex->e_protocol) { - ERR(EAI_BADHINTS); + SETERROR(EAI_BADHINTS); } } } @@ -410,7 +410,7 @@ getaddrinfo(hostname, servname, hints, res) case AI_ALL: #if 1 /* illegal */ - ERR(EAI_BADFLAGS); + SETERROR(EAI_BADFLAGS); #else pai->ai_flags &= ~(AI_ALL | AI_V4MAPPED); break; @@ -438,7 +438,7 @@ getaddrinfo(hostname, servname, hints, res) } error = get_portmatch(pai, servname); if (error) - ERR(error); + SETERROR(error); *pai = ai0; } @@ -497,9 +497,9 @@ getaddrinfo(hostname, servname, hints, res) goto good; if (pai->ai_flags & AI_NUMERICHOST) - ERR(EAI_NONAME); + SETERROR(EAI_NONAME); if (hostname == NULL) - ERR(EAI_NONAME); + SETERROR(EAI_NONAME); /* * hostname as alphabetical name. @@ -807,7 +807,7 @@ explore_numeric(pai, hostname, servname, res) while (cur->ai_next) cur = cur->ai_next; } else - ERR(EAI_FAMILY); /*xxx*/ + SETERROR(EAI_FAMILY); /*xxx*/ } break; #endif @@ -820,7 +820,7 @@ explore_numeric(pai, hostname, servname, res) while (cur->ai_next) cur = cur->ai_next; } else - ERR(EAI_FAMILY); /*xxx*/ + SETERROR(EAI_FAMILY); /*xxx*/ } break; }