rpc_set_error(nfs->rpc, "out of memory. failed to allocate memory for nfs mount data");
return -1;
}
- bzero(data, sizeof(struct nfs_cb_data));
+ bzero((char *)data, sizeof(struct nfs_cb_data));
new_server = strdup(server);
new_export = strdup(export);
if (nfs->server != NULL) {
rpc_set_error(nfs->rpc, "out of memory: failed to allocate nfs_cb_data structure");
return -1;
}
- bzero(data, sizeof(struct nfs_cb_data));
+ bzero((char *)data, sizeof(struct nfs_cb_data));
data->nfs = nfs;
data->cb = cb;
data->continue_cb = continue_cb;
free_nfs_cb_data(data);
return;
}
- bzero(nfsfh, sizeof(struct nfsfh));
+ bzero((char *)nfsfh, sizeof(struct nfsfh));
if (data->continue_int & O_SYNC) {
nfsfh->is_sync = 1;
rpc_set_error(nfs->rpc, "out of memory: failed to allocate nfs_cb_data structure");
return -1;
}
- bzero(data, sizeof(struct nfs_cb_data));
+ bzero((char *)data, sizeof(struct nfs_cb_data));
data->nfs = nfs;
data->cb = cb;
data->private_data = private_data;
rpc_set_error(nfs->rpc, "out of memory: failed to allocate nfs_mcb_data structure");
return -1;
}
- bzero(mdata, sizeof(struct nfs_mcb_data));
+ bzero((char *)mdata, sizeof(struct nfs_mcb_data));
mdata->data = data;
mdata->offset = offset;
mdata->count = readcount;
rpc_set_error(nfs->rpc, "out of memory: failed to allocate nfs_cb_data structure");
return -1;
}
- bzero(data, sizeof(struct nfs_cb_data));
+ bzero((char *)data, sizeof(struct nfs_cb_data));
data->nfs = nfs;
data->cb = cb;
data->private_data = private_data;
rpc_set_error(nfs->rpc, "out of memory: failed to allocate nfs_cb_data structure");
return -1;
}
- bzero(data, sizeof(struct nfs_cb_data));
+ bzero((char *)data, sizeof(struct nfs_cb_data));
data->nfs = nfs;
data->cb = cb;
data->private_data = private_data;
rpc_set_error(nfs->rpc, "out of memory: failed to allocate nfs_cb_data structure");
return -1;
}
- bzero(data, sizeof(struct nfs_cb_data));
+ bzero((char *)data, sizeof(struct nfs_cb_data));
data->nfs = nfs;
data->cb = cb;
data->private_data = private_data;
rpc_set_error(nfs->rpc, "out of memory: failed to allocate nfs_cb_data structure");
return -1;
}
- bzero(data, sizeof(struct nfs_cb_data));
+ bzero((char *)data, sizeof(struct nfs_cb_data));
data->nfs = nfs;
data->cb = cb;
data->private_data = private_data;
- bzero(&args, sizeof(SETATTR3args));
+ bzero((char *)&args, sizeof(SETATTR3args));
args.object.data.data_len = nfsfh->fh.data.data_len;
args.object.data.data_val = nfsfh->fh.data.data_val;
args.new_attributes.size.set_it = 1;
free_nfs_cb_data(data);
return;
}
- bzero(nfsfh, sizeof(struct nfsfh));
+ bzero((char *)nfsfh, sizeof(struct nfsfh));
/* steal the filehandle */
nfsfh->fh.data.data_len = data->fh.data.data_len;
free_nfs_cb_data(data);
return;
}
- bzero(nfsdirent, sizeof(struct nfsdirent));
+ bzero((char *)nfsdirent, sizeof(struct nfsdirent));
nfsdirent->name = strdup(entry->name);
if (nfsdirent->name == NULL) {
data->cb(-ENOMEM, nfs, "Failed to allocate dirent->name", data->private_data);
{
cookieverf3 cv;
- bzero(cv, sizeof(cookieverf3));
+ bzero((char *)cv, sizeof(cookieverf3));
if (rpc_nfs_readdirplus_async(nfs->rpc, nfs_opendir_cb, &data->fh, 0, (char *)&cv, 8192, data) != 0) {
rpc_set_error(nfs->rpc, "RPC error: Failed to send READDIRPLUS call for %s", data->path);
data->cb(-ENOMEM, nfs, rpc_get_error(nfs->rpc), data->private_data);
rpc_set_error(nfs->rpc, "failed to allocate buffer for nfsdir");
return -1;
}
- bzero(nfsdir, sizeof(struct nfsdir));
+ bzero((char *)nfsdir, sizeof(struct nfsdir));
if (nfs_lookuppath_async(nfs, path, cb, private_data, nfs_opendir_continue_internal, nfsdir, free, 0) != 0) {
rpc_set_error(nfs->rpc, "Out of memory: failed to start parsing the path components");
{
SETATTR3args args;
- bzero(&args, sizeof(SETATTR3args));
+ bzero((char *)&args, sizeof(SETATTR3args));
args.object.data.data_len = data->fh.data.data_len;
args.object.data.data_val = data->fh.data.data_val;
args.new_attributes.mode.set_it = 1;
rpc_set_error(nfs->rpc, "out of memory. failed to allocate memory for nfs mount data");
return -1;
}
- bzero(data, sizeof(struct nfs_cb_data));
+ bzero((char *)data, sizeof(struct nfs_cb_data));
data->nfs = nfs;
data->cb = cb;
data->private_data = private_data;
SETATTR3args args;
struct nfs_chown_data *chown_data = data->continue_data;
- bzero(&args, sizeof(SETATTR3args));
+ bzero((char *)&args, sizeof(SETATTR3args));
args.object.data.data_len = data->fh.data.data_len;
args.object.data.data_val = data->fh.data.data_val;
if (chown_data->uid != (uid_t)-1) {
rpc_set_error(nfs->rpc, "out of memory. failed to allocate memory for fchown data");
return -1;
}
- bzero(data, sizeof(struct nfs_cb_data));
+ bzero((char *)data, sizeof(struct nfs_cb_data));
data->nfs = nfs;
data->cb = cb;
data->private_data = private_data;
SETATTR3args args;
struct timeval *utimes_data = data->continue_data;
- bzero(&args, sizeof(SETATTR3args));
+ bzero((char *)&args, sizeof(SETATTR3args));
args.object.data.data_len = data->fh.data.data_len;
args.object.data.data_val = data->fh.data.data_val;
if (utimes_data != NULL) {
rpc_set_error(nfs->rpc, "Out of memory, failed to allocate buffer for symlink data");
return -1;
}
- bzero(symlink_data, sizeof(struct nfs_symlink_data));
+ bzero((char *)symlink_data, sizeof(struct nfs_symlink_data));
symlink_data->oldpath = strdup(oldpath);
if (symlink_data->oldpath == NULL) {
rpc_set_error(nfs->rpc, "Out of memory, failed to allocate buffer for rename data");
return -1;
}
- bzero(rename_data, sizeof(struct nfs_rename_data));
+ bzero((char *)rename_data, sizeof(struct nfs_rename_data));
rename_data->oldpath = strdup(oldpath);
if (rename_data->oldpath == NULL) {
rpc_set_error(nfs->rpc, "Out of memory, failed to allocate buffer for link data");
return -1;
}
- bzero(link_data, sizeof(struct nfs_link_data));
+ bzero((char *)link_data, sizeof(struct nfs_link_data));
link_data->oldpath = strdup(oldpath);
if (link_data->oldpath == NULL) {
if (data == NULL) {
return -1;
}
- bzero(data, sizeof(struct mount_cb_data));
+ bzero((char *)data, sizeof(struct mount_cb_data));
data->cb = cb;
data->private_data = private_data;
data->server = strdup(server);
rpc_set_error(rpc, "Out of memory: Failed to allocate pdu structure");
return NULL;
}
- bzero(pdu, sizeof(struct rpc_pdu));
+ bzero((char *)pdu, 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(&msg, sizeof(struct rpc_msg));
+ bzero((char *)&msg, 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(&msg, sizeof(struct rpc_msg));
+ bzero((char *)&msg, 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(pdu->xdr_decode_buf, pdu->xdr_decode_bufsize);
+ bzero((char *)pdu->xdr_decode_buf, 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(&xdr, sizeof(XDR));
+ bzero((char *)&xdr, sizeof(XDR));
xdrmem_create(&xdr, buf, size, XDR_DECODE);
if (rpc->is_udp == 0) {
return -1;
}
- bzero(&args, sizeof(MKDIR3args));
+ bzero((char *)&args, sizeof(MKDIR3args));
args.where.dir.data.data_len = fh->data.data_len;
args.where.dir.data.data_val = fh->data.data_val;
args.where.name = dir;
return -1;
}
- bzero(&args, sizeof(RMDIR3args));
+ bzero((char *)&args, sizeof(RMDIR3args));
args.object.dir.data.data_len = fh->data.data_len;
args.object.dir.data.data_val = fh->data.data_val;
args.object.name = dir;
return -1;
}
- bzero(&args, sizeof(CREATE3args));
+ bzero((char *)&args, sizeof(CREATE3args));
args.where.dir.data.data_len = fh->data.data_len;
args.where.dir.data.data_val = fh->data.data_val;
args.where.name = file;
return -1;
}
- bzero(&args, sizeof(REMOVE3args));
+ bzero((char *)&args, sizeof(REMOVE3args));
args.object.dir.data.data_len = fh->data.data_len;
args.object.dir.data.data_val = fh->data.data_val;
args.object.name = file;
return -1;
}
- bzero(&args, sizeof(READDIR3args));
+ bzero((char *)&args, sizeof(READDIR3args));
args.dir.data.data_len = fh->data.data_len;
args.dir.data.data_val = fh->data.data_val;
args.cookie = cookie;
return -1;
}
- bzero(&args, sizeof(READDIRPLUS3args));
+ bzero((char *)&args, sizeof(READDIRPLUS3args));
args.dir.data.data_len = fh->data.data_len;
args.dir.data.data_val = fh->data.data_val;
args.cookie = cookie;
return -1;
}
- bzero(&args, sizeof(SYMLINK3args));
+ bzero((char *)&args, sizeof(SYMLINK3args));
args.where.dir.data.data_len = fh->data.data_len;
args.where.dir.data.data_val = fh->data.data_val;
args.where.name = newname;
return -1;
}
- bzero(&args, sizeof(RENAME3args));
+ bzero((char *)&args, sizeof(RENAME3args));
args.from.dir.data.data_len = olddir->data.data_len;
args.from.dir.data.data_val = olddir->data.data_val;
args.from.name = oldname;
return -1;
}
- bzero(&args, sizeof(LINK3args));
+ bzero((char *)&args, sizeof(LINK3args));
args.file.data.data_len = file->data.data_len;
args.file.data.data_val = file->data.data_val;
args.link.dir.data.data_len = newdir->data.data_len;