diff options
Diffstat (limited to 'nis/nis_mkdir.c')
-rw-r--r-- | nis/nis_mkdir.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/nis/nis_mkdir.c b/nis/nis_mkdir.c index b762e93f27..ab693d7da1 100644 --- a/nis/nis_mkdir.c +++ b/nis/nis_mkdir.c @@ -24,23 +24,19 @@ nis_error nis_mkdir (const_nis_name dir, const nis_server *server) { - nis_error res; + nis_error res, res2; if (server == NULL) - { - if (__do_niscall (dir, NIS_MKDIR, (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_MKDIR, - (xdrproc_t) xdr_nis_name, + res2 = __do_niscall (dir, NIS_MKDIR, (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); + else + res2 = __do_niscall2 (server, 1, NIS_MKDIR, + (xdrproc_t) xdr_nis_name, + (caddr_t) &dir, (xdrproc_t) xdr_nis_error, + (caddr_t) &res, 0, NULL); + if (res2 != NIS_SUCCESS) + return res2; return res; } |