Add more tests.
[kopensolaris-gnu/glibc.git] / sunrpc / rpc_cmsg.c
index 3930de3..dea0753 100644 (file)
@@ -82,7 +82,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
          IXDR_PUT_INT32 (buf, oa->oa_length);
          if (oa->oa_length)
            {
-             bcopy (oa->oa_base, (caddr_t) buf, oa->oa_length);
+             memcpy ((caddr_t) buf, oa->oa_base, oa->oa_length);
              buf = (int32_t *) ((char *) buf + RNDUP (oa->oa_length));
            }
          oa = &cmsg->rm_call.cb_verf;
@@ -90,7 +90,7 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
          IXDR_PUT_INT32 (buf, oa->oa_length);
          if (oa->oa_length)
            {
-             bcopy (oa->oa_base, (caddr_t) buf, oa->oa_length);
+             memcpy ((caddr_t) buf, oa->oa_base, oa->oa_length);
              /* no real need....
                 buf = (long *) ((char *) buf + RNDUP(oa->oa_length));
               */
@@ -132,14 +132,13 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
              buf = XDR_INLINE (xdrs, RNDUP (oa->oa_length));
              if (buf == NULL)
                {
-                 if (xdr_opaque (xdrs, oa->oa_base,
-                                 oa->oa_length) == FALSE)
+                 if (INTUSE(xdr_opaque) (xdrs, oa->oa_base,
+                                         oa->oa_length) == FALSE)
                    return FALSE;
                }
              else
                {
-                 bcopy ((caddr_t) buf, oa->oa_base,
-                        oa->oa_length);
+                 memcpy (oa->oa_base, (caddr_t) buf, oa->oa_length);
                  /* no real need....
                     buf = (long *) ((char *) buf
                     + RNDUP(oa->oa_length));
@@ -150,8 +149,8 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
          buf = XDR_INLINE (xdrs, 2 * BYTES_PER_XDR_UNIT);
          if (buf == NULL)
            {
-             if (xdr_enum (xdrs, &oa->oa_flavor) == FALSE ||
-                 xdr_u_int (xdrs, &oa->oa_length) == FALSE)
+             if (INTUSE(xdr_enum) (xdrs, &oa->oa_flavor) == FALSE ||
+                 INTUSE(xdr_u_int) (xdrs, &oa->oa_length) == FALSE)
                {
                  return FALSE;
                }
@@ -173,14 +172,13 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
              buf = XDR_INLINE (xdrs, RNDUP (oa->oa_length));
              if (buf == NULL)
                {
-                 if (xdr_opaque (xdrs, oa->oa_base,
-                                 oa->oa_length) == FALSE)
+                 if (INTUSE(xdr_opaque) (xdrs, oa->oa_base,
+                                         oa->oa_length) == FALSE)
                    return FALSE;
                }
              else
                {
-                 bcopy ((caddr_t) buf, oa->oa_base,
-                        oa->oa_length);
+                 memcpy (oa->oa_base, (caddr_t) buf, oa->oa_length);
                  /* no real need...
                     buf = (long *) ((char *) buf
                     + RNDUP(oa->oa_length));
@@ -191,15 +189,16 @@ xdr_callmsg (XDR *xdrs, struct rpc_msg *cmsg)
        }
     }
   if (
-       xdr_u_long (xdrs, &(cmsg->rm_xid)) &&
-       xdr_enum (xdrs, (enum_t *) & (cmsg->rm_direction)) &&
+       INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_xid)) &&
+       INTUSE(xdr_enum) (xdrs, (enum_t *) & (cmsg->rm_direction)) &&
        (cmsg->rm_direction == CALL) &&
-       xdr_u_long (xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
+       INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_rpcvers)) &&
        (cmsg->rm_call.cb_rpcvers == RPC_MSG_VERSION) &&
-       xdr_u_long (xdrs, &(cmsg->rm_call.cb_prog)) &&
-       xdr_u_long (xdrs, &(cmsg->rm_call.cb_vers)) &&
-       xdr_u_long (xdrs, &(cmsg->rm_call.cb_proc)) &&
-       xdr_opaque_auth (xdrs, &(cmsg->rm_call.cb_cred)))
-    return xdr_opaque_auth (xdrs, &(cmsg->rm_call.cb_verf));
+       INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_prog)) &&
+       INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_vers)) &&
+       INTUSE(xdr_u_long) (xdrs, &(cmsg->rm_call.cb_proc)) &&
+       INTUSE(xdr_opaque_auth) (xdrs, &(cmsg->rm_call.cb_cred)))
+    return INTUSE(xdr_opaque_auth) (xdrs, &(cmsg->rm_call.cb_verf));
   return FALSE;
 }
+INTDEF(xdr_callmsg)