aboutsummaryrefslogtreecommitdiff
path: root/nss/getXXbyYY_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/getXXbyYY_r.c')
-rw-r--r--nss/getXXbyYY_r.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index 632778d9aa..3f873a5fde 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -247,12 +247,14 @@ done:
#ifdef POSTPROCESS
POSTPROCESS;
#endif
- return (status != NSS_STATUS_TRYAGAIN ? 0
+ return (status == NSS_STATUS_SUCCESS ? 0
+ : (status != NSS_STATUS_TRYAGAIN
#ifdef NEED_H_ERRNO
- /* These functions only set errno if h_errno is NETDB_INTERNAL. */
- : *h_errnop != NETDB_INTERNAL ? EAGAIN
+ /* These functions only set errno if h_errno is
+ NETDB_INTERNAL. */
+ && *h_errnop == NETDB_INTERNAL
#endif
- : errno);
+ ? errno : EAGAIN));
}