rpc_set_error(rpc, "Out of memory: Failed to allocate pdu structure");
return NULL;
}
- bzero((char *)pdu, sizeof(struct rpc_pdu));
+ memset(pdu, 0, sizeof(struct rpc_pdu));
pdu->xid = rpc->xid++;
pdu->cb = cb;
pdu->private_data = private_data;
xdr_setpos(&pdu->xdr, 4); /* skip past the record marker */
}
- bzero((char *)&msg, sizeof(struct rpc_msg));
+ memset(&msg, 0, sizeof(struct rpc_msg));
msg.rm_xid = pdu->xid;
msg.rm_direction = CALL;
msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
{
struct rpc_msg msg;
- bzero((char *)&msg, sizeof(struct rpc_msg));
+ memset(&msg, 0, sizeof(struct rpc_msg));
msg.acpted_rply.ar_verf = _null_auth;
if (pdu->xdr_decode_bufsize > 0) {
if (pdu->xdr_decode_buf != NULL) {
pdu->cb(rpc, RPC_STATUS_ERROR, "Failed to allocate buffer for decoding of XDR reply", pdu->private_data);
return 0;
}
- bzero((char *)pdu->xdr_decode_buf, pdu->xdr_decode_bufsize);
+ memset(pdu->xdr_decode_buf, 0, pdu->xdr_decode_bufsize);
}
msg.acpted_rply.ar_results.where = pdu->xdr_decode_buf;
msg.acpted_rply.ar_results.proc = pdu->xdr_decode_fn;
int pos, recordmarker;
unsigned int xid;
- bzero((char *)&xdr, sizeof(XDR));
+ memset(&xdr, 0, sizeof(XDR));
xdrmem_create(&xdr, buf, size, XDR_DECODE);
if (rpc->is_udp == 0) {