summaryrefslogtreecommitdiff
path: root/nis/nis_rmdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nis_rmdir.c')
-rw-r--r--nis/nis_rmdir.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/nis/nis_rmdir.c b/nis/nis_rmdir.c
index adf5924ada..ff84ed81e2 100644
--- a/nis/nis_rmdir.c
+++ b/nis/nis_rmdir.c
@@ -24,23 +24,17 @@
nis_error
nis_rmdir (const_nis_name dir, const nis_server *server)
{
- nis_error res;
+ nis_error res, res2;
if (server == NULL)
- {
- if (__do_niscall (dir, NIS_RMDIR, (xdrproc_t) xdr_nis_name,
+ return NIS_SYSTEMERROR;
+
+ res2 = __do_niscall2 (server, 1, NIS_RMDIR,
+ (xdrproc_t) xdr_nis_name,
(caddr_t) &dir, (xdrproc_t) xdr_nis_error,
- (caddr_t) &res, 0, NULL) != RPC_SUCCESS)
- return NIS_RPCERROR;
- }
- else
- {
- if (__do_niscall2 (server, 1, NIS_RMDIR,
- (xdrproc_t) xdr_nis_name,
- (caddr_t) &dir, (xdrproc_t) xdr_nis_error,
- (caddr_t) &res, 0, NULL) != RPC_SUCCESS)
- return NIS_RPCERROR;
- }
+ (caddr_t) &res, 0, NULL);
+ if (res2 != NIS_SUCCESS)
+ return res2;
return res;
}