summaryrefslogtreecommitdiff
path: root/lib/libc/net/getnetbynis.c
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2010-08-28 17:06:22 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2010-08-28 17:06:22 +0000
commitc93734c0184c75b3c4993229dd956e1c508b20c5 (patch)
treec308aa7eba638f6daf3135b13d8c446208e5cec2 /lib/libc/net/getnetbynis.c
parent7d6f2dcaf34eb5134197c2fc4f92c752fa0f2ff9 (diff)
Notes
Diffstat (limited to 'lib/libc/net/getnetbynis.c')
-rw-r--r--lib/libc/net/getnetbynis.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/net/getnetbynis.c b/lib/libc/net/getnetbynis.c
index d00c7f28970c..811e4313c5ff 100644
--- a/lib/libc/net/getnetbynis.c
+++ b/lib/libc/net/getnetbynis.c
@@ -160,8 +160,10 @@ _nis_getnetbyname(void *rval, void *cb_data, va_list ap)
return (NS_NOTFOUND);
}
if (__copy_netent(&ne, nptr, buffer, buflen) != 0) {
+ *errnop = errno;
+ RES_SET_H_ERRNO(statp, NETDB_INTERNAL);
*h_errnop = statp->res_h_errno;
- return (NS_NOTFOUND);
+ return (NS_RETURN);
}
*((struct netent **)rval) = nptr;
return (NS_SUCCESS);
@@ -244,8 +246,10 @@ _nis_getnetbyaddr(void *rval, void *cb_data, va_list ap)
return (NS_NOTFOUND);
}
if (__copy_netent(&ne, nptr, buffer, buflen) != 0) {
+ *errnop = errno;
+ RES_SET_H_ERRNO(statp, NETDB_INTERNAL);
*h_errnop = statp->res_h_errno;
- return (NS_NOTFOUND);
+ return (NS_RETURN);
}
*((struct netent **)rval) = nptr;
return (NS_SUCCESS);