summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/clnt_raw.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/rpc/clnt_raw.c')
-rw-r--r--lib/libc/rpc/clnt_raw.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libc/rpc/clnt_raw.c b/lib/libc/rpc/clnt_raw.c
index 9d34a3d..cd3a384 100644
--- a/lib/libc/rpc/clnt_raw.c
+++ b/lib/libc/rpc/clnt_raw.c
@@ -92,13 +92,13 @@ clnt_raw_create(prog, vers)
rpcprog_t prog;
rpcvers_t vers;
{
- struct clntraw_private *clp = clntraw_private;
+ struct clntraw_private *clp;
struct rpc_msg call_msg;
- XDR *xdrs = &clp->xdr_stream;
- CLIENT *client = &clp->client_object;
+ XDR *xdrs;
+ CLIENT *client;
mutex_lock(&clntraw_lock);
- if (clp == NULL) {
+ if ((clp = clntraw_private) == NULL) {
clp = (struct clntraw_private *)calloc(1, sizeof (*clp));
if (clp == NULL) {
mutex_unlock(&clntraw_lock);
@@ -110,6 +110,9 @@ clnt_raw_create(prog, vers)
clp->_raw_buf = __rpc_rawcombuf;
clntraw_private = clp;
}
+ xdrs = &clp->xdr_stream;
+ client = &clp->client_object;
+
/*
* pre-serialize the static part of the call msg and stash it away
*/
OpenPOWER on IntegriCloud