aboutsummaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
Diffstat (limited to 'resolv')
-rw-r--r--resolv/nss_dns/dns-network.c28
-rw-r--r--resolv/res_send.c4
2 files changed, 17 insertions, 15 deletions
diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c
index 61f6f90b47..e9a4b91e9d 100644
--- a/resolv/nss_dns/dns-network.c
+++ b/resolv/nss_dns/dns-network.c
@@ -231,19 +231,21 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result,
char *ans;
if (question_count == 0)
- /* FIXME: the Sun version uses for host name lookup an additional
- parameter for pointing to h_errno. this is missing here.
- OSF/1 has a per-thread h_errno variable. */
- if (header_pointer->aa != 0)
- {
- __set_h_errno (HOST_NOT_FOUND);
- return NSS_STATUS_NOTFOUND;
- }
- else
- {
- __set_h_errno (TRY_AGAIN);
- return NSS_STATUS_TRYAGAIN;
- }
+ {
+ /* FIXME: the Sun version uses for host name lookup an additional
+ parameter for pointing to h_errno. this is missing here.
+ OSF/1 has a per-thread h_errno variable. */
+ if (header_pointer->aa != 0)
+ {
+ __set_h_errno (HOST_NOT_FOUND);
+ return NSS_STATUS_NOTFOUND;
+ }
+ else
+ {
+ __set_h_errno (TRY_AGAIN);
+ return NSS_STATUS_TRYAGAIN;
+ }
+ }
/* Skip the question part. */
while (question_count-- > 0)
diff --git a/resolv/res_send.c b/resolv/res_send.c
index 0c784688ac..608659b2ca 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -782,12 +782,12 @@ read_len:
} /*foreach ns*/
} /*foreach retry*/
res_close();
- if (!v_circuit)
+ if (!v_circuit) {
if (!gotsomewhere)
__set_errno (ECONNREFUSED); /* no nameservers found */
else
__set_errno (ETIMEDOUT); /* no answer obtained */
- else
+ } else
__set_errno (terrno);
return (-1);
}