if(!fs.out.domain_sid)
return NULL;
- sid = talloc_memdup(mem_ctx, &(fs.out.domain_sid->sid), sizeof(DOM_SID));
+ sid = (DOM_SID *)talloc_memdup(mem_ctx, &(fs.out.domain_sid->sid),
+ sizeof(DOM_SID));
if(!sid) {
hnd->status = NT_STATUS_NO_MEMORY;
data->reg_binary.data_length = size;
- data->reg_binary.data = talloc_memdup(mem_ctx, buf.buffer, size);
+ data->reg_binary.data = (uint8 *)talloc_memdup(mem_ctx, buf.buffer,
+ size);
if(!data->reg_binary.data) {
TALLOC_FREE(data);
errno = ENOMEM;
memcpy(info->nt_password, id21->nt_pwd, 8);
memcpy(info->lm_password, id21->lm_pwd, 8);
- info->logon_hours = talloc_memdup(mem_ctx, &(id21->logon_hrs), sizeof(LOGON_HRS));
+ info->logon_hours = (LOGON_HRS *)talloc_memdup(mem_ctx, &(id21->logon_hrs),
+ sizeof(LOGON_HRS));
if(!info->logon_hours)
return NULL;
db_data = tdb_fetch(db_ctx->smb_tdb, locking_key);
if (!db_data.dptr) {
/* We must create the entry. */
- db_data.dptr = malloc((2*sizeof(struct share_mode_entry)) +
- strlen(sharepath) + 1 +
- strlen(filename) + 1);
+ db_data.dptr = (char *)malloc(
+ (2*sizeof(struct share_mode_entry)) +
+ strlen(sharepath) + 1 +
+ strlen(filename) + 1);
if (!db_data.dptr) {
return -1;
}
}
/* Entry exists, we must add a new entry. */
- new_data_p = malloc(db_data.dsize + sizeof(struct share_mode_entry));
+ new_data_p = (char *)malloc(
+ db_data.dsize + sizeof(struct share_mode_entry));
if (!new_data_p) {
free(db_data.dptr);
return -1;
}
/* More than one - allocate a new record minus the one we'll delete. */
- new_data_p = malloc(db_data.dsize - sizeof(struct share_mode_entry));
+ new_data_p = (char *)malloc(
+ db_data.dsize - sizeof(struct share_mode_entry));
if (!new_data_p) {
free(db_data.dptr);
return -1;
return_result:
- pw_cache = getpwent_response.extra_data.data;
+ pw_cache = (struct winbindd_pw *)
+ getpwent_response.extra_data.data;
/* Check data is valid */
return_result:
- gr_cache = getgrent_response.extra_data.data;
+ gr_cache = (struct winbindd_gr *)
+ getgrent_response.extra_data.data;
/* Check data is valid */
if (ret == NSS_STATUS_SUCCESS) {
ret = fill_grent(result, &response.data.gr,
- response.extra_data.data,
+ (char *)response.extra_data.data,
&buffer, &buflen);
if (ret == NSS_STATUS_TRYAGAIN) {
/* We've been called again */
ret = fill_grent(result, &response.data.gr,
- response.extra_data.data, &buffer, &buflen);
+ (char *)response.extra_data.data, &buffer,
+ &buflen);
if (ret == NSS_STATUS_TRYAGAIN) {
keep_response = True;
if (ret == NSS_STATUS_SUCCESS) {
ret = fill_grent(result, &response.data.gr,
- response.extra_data.data,
+ (char *)response.extra_data.data,
&buffer, &buflen);
if (ret == NSS_STATUS_TRYAGAIN) {
/* We've been called again */
ret = fill_grent(result, &response.data.gr,
- response.extra_data.data, &buffer, &buflen);
+ (char *)response.extra_data.data, &buffer,
+ &buflen);
if (ret == NSS_STATUS_TRYAGAIN) {
keep_response = True;
}
}
- newgroups = realloc((*groups), newsize * sizeof(**groups));
+ newgroups = (gid_t *)
+ realloc((*groups),
+ newsize * sizeof(**groups));
if (!newgroups) {
*errnop = ENOMEM;
ret = NSS_STATUS_NOTFOUND;
/* Yes this should be malloc not talloc. Don't change. */
- chaine.buffer = SMB_MALLOC((q-p+1)*sizeof(uint16));
+ chaine.buffer = (uint16 *)
+ SMB_MALLOC((q-p+1)*sizeof(uint16));
if (chaine.buffer == NULL)
return False;
return False;
if (UNMARSHALLING(ps)) {
- v->stores = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->stores)*v->num_stores);
+ v->stores = (NETDFS_DFS_STORAGEINFO *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->stores)*v->num_stores);
}
for (i_stores_1=0; i_stores_1<v->num_stores;i_stores_1++) {
if (!netdfs_io_dfs_StorageInfo_p("stores", &v->stores[i_stores_1], ps, depth))
return False;
if (UNMARSHALLING(ps)) {
- v->stores = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->stores)*v->num_stores);
+ v->stores = (NETDFS_DFS_STORAGEINFO *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->stores)*v->num_stores);
}
for (i_stores_1=0; i_stores_1<v->num_stores;i_stores_1++) {
if (!netdfs_io_dfs_StorageInfo_p("stores", &v->stores[i_stores_1], ps, depth))
return False;
if (UNMARSHALLING(ps)) {
- v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
+ v->s = (NETDFS_DFS_INFO1 *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
}
for (i_s_1=0; i_s_1<v->count;i_s_1++) {
if (!netdfs_io_dfs_Info1_p("s", &v->s[i_s_1], ps, depth))
return False;
if (UNMARSHALLING(ps)) {
- v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
+ v->s = (NETDFS_DFS_INFO2 *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
}
for (i_s_1=0; i_s_1<v->count;i_s_1++) {
if (!netdfs_io_dfs_Info2_p("s", &v->s[i_s_1], ps, depth))
return False;
if (UNMARSHALLING(ps)) {
- v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
+ v->s = (NETDFS_DFS_INFO3 *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
}
for (i_s_1=0; i_s_1<v->count;i_s_1++) {
if (!netdfs_io_dfs_Info3_p("s", &v->s[i_s_1], ps, depth))
return False;
if (UNMARSHALLING(ps)) {
- v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
+ v->s = (NETDFS_DFS_INFO4 *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
}
for (i_s_1=0; i_s_1<v->count;i_s_1++) {
if (!netdfs_io_dfs_Info4_p("s", &v->s[i_s_1], ps, depth))
return False;
if (UNMARSHALLING(ps)) {
- v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
+ v->s = (NETDFS_DFS_INFO200 *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
}
for (i_s_1=0; i_s_1<v->count;i_s_1++) {
if (!netdfs_io_dfs_Info200_p("s", &v->s[i_s_1], ps, depth))
return False;
if (UNMARSHALLING(ps)) {
- v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
+ v->s = (NETDFS_DFS_INFO300 *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
}
for (i_s_1=0; i_s_1<v->count;i_s_1++) {
if (!netdfs_io_dfs_Info300_p("s", &v->s[i_s_1], ps, depth))
} else {
char x = 1;
res = A_0;
- if (cli_read(cli1, fnum2, (void *)&x, 0, 1) == 1) {
+ if (cli_read(cli1, fnum2, (char *)&x, 0, 1) == 1) {
res += A_R;
}
- if (cli_write(cli1, fnum2, 0, (void *)&x, 0, 1) == 1) {
+ if (cli_write(cli1, fnum2, 0, (char *)&x, 0, 1) == 1) {
res += A_W;
}
}
} else {
char x = 1;
res = A_0;
- if (cli_read(cli2, fnum2, (void *)&x, 0, 1) == 1) {
+ if (cli_read(cli2, fnum2, (char *)&x, 0, 1) == 1) {
res += A_R;
}
- if (cli_write(cli2, fnum2, 0, (void *)&x, 0, 1) == 1) {
+ if (cli_write(cli2, fnum2, 0, (char *)&x, 0, 1) == 1) {
res += A_W;
}
}
int handle;
} ftable[MAX_FILES];
-static struct {
+static struct children {
double bytes_in, bytes_out;
int line;
int done;
void nbio_shmem(int n)
{
nprocs = n;
- children = shm_setup(sizeof(*children) * nprocs);
+ children = (struct children *)shm_setup(sizeof(*children) * nprocs);
if (!children) {
printf("Failed to setup shared memory!\n");
exit(1);
pdb_get_account_policy(AP_PASSWORD_HISTORY, &history);
if (history * PW_HISTORY_ENTRY_LEN < NT_HASH_LEN) {
- buf = TALLOC(ctx, NT_HASH_LEN);
+ buf = (uint8 *)TALLOC(ctx, NT_HASH_LEN);
} else {
- buf = TALLOC(ctx, history * PW_HISTORY_ENTRY_LEN);
+ buf = (uint8 *)TALLOC(ctx, history * PW_HISTORY_ENTRY_LEN);
}
/* Generate some random hashes */