aboutsummaryrefslogtreecommitdiff
path: root/nis/nis_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nis_util.c')
-rw-r--r--nis/nis_util.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/nis/nis_util.c b/nis/nis_util.c
index 4e39d6fb6a..b6eef9b227 100644
--- a/nis/nis_util.c
+++ b/nis/nis_util.c
@@ -24,6 +24,7 @@
fd_result *
__nis_finddirectory (directory_obj *dir, const_nis_name name)
{
+ nis_error status;
fd_args fd_args;
fd_result *fd_res;
@@ -31,13 +32,14 @@ __nis_finddirectory (directory_obj *dir, const_nis_name name)
fd_args.requester = nis_local_host();
fd_res = calloc (1, sizeof (fd_result));
- if (__do_niscall2 (dir->do_servers.do_servers_val,
- dir->do_servers.do_servers_len, NIS_FINDDIRECTORY,
- (xdrproc_t) xdr_fd_args,
- (caddr_t) &fd_args, (xdrproc_t) xdr_fd_result,
- (caddr_t) fd_res, NO_AUTHINFO|USE_DGRAM) != NIS_SUCCESS)
- fd_res->status = NIS_RPCERROR;
-
+ if ((status = __do_niscall2 (dir->do_servers.do_servers_val,
+ dir->do_servers.do_servers_len,
+ NIS_FINDDIRECTORY, (xdrproc_t) xdr_fd_args,
+ (caddr_t) &fd_args, (xdrproc_t) xdr_fd_result,
+ (caddr_t) fd_res,
+ NO_AUTHINFO|USE_DGRAM)) != NIS_SUCCESS)
+ fd_res->status = status;
+
return fd_res;
}