diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-07-30 16:36:56 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:25 -0500 |
commit | e23781b3b304d1e69ad80af5ae9c0ed8d02cf996 (patch) | |
tree | d3a6eb0774d9ce907152e886c4c920d24ac2d715 /source3/smbd | |
parent | 5a5deade6e4634aad561139f39337c9a960c0b80 (diff) | |
download | samba-e23781b3b304d1e69ad80af5ae9c0ed8d02cf996.tar.gz samba-e23781b3b304d1e69ad80af5ae9c0ed8d02cf996.tar.bz2 samba-e23781b3b304d1e69ad80af5ae9c0ed8d02cf996.zip |
r17316: More C++ warnings -- 456 left
(This used to be commit 1e4ee728df7eeafc1b4d533240acb032f73b4f5c)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/ipc.c | 4 | ||||
-rw-r--r-- | source3/smbd/nttrans.c | 8 | ||||
-rw-r--r-- | source3/smbd/trans2.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c index e6dfc6506a..08381524c0 100644 --- a/source3/smbd/ipc.c +++ b/source3/smbd/ipc.c @@ -478,7 +478,7 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, if (state->total_data) { /* Can't use talloc here, the core routines do realloc on the * params and data. */ - state->data = SMB_MALLOC(state->total_data); + state->data = (char *)SMB_MALLOC(state->total_data); if (state->data == NULL) { DEBUG(0,("reply_trans: data malloc fail for %u " "bytes !\n", (unsigned int)state->total_data)); @@ -498,7 +498,7 @@ int reply_trans(connection_struct *conn, char *inbuf,char *outbuf, if (state->total_param) { /* Can't use talloc here, the core routines do realloc on the * params and data. */ - state->param = SMB_MALLOC(state->total_param); + state->param = (char *)SMB_MALLOC(state->total_param); if (state->param == NULL) { DEBUG(0,("reply_trans: param malloc fail for %u " "bytes !\n", (unsigned int)state->total_param)); diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 0b1bdcadbb..d107bf84d3 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -52,7 +52,7 @@ static char *nttrans_realloc(char **ptr, size_t size) smb_panic("nttrans_realloc() called with NULL ptr\n"); } - *ptr = SMB_REALLOC(*ptr, size); + *ptr = (char *)SMB_REALLOC(*ptr, size); if(*ptr == NULL) { return NULL; } @@ -2908,7 +2908,7 @@ int reply_nttrans(connection_struct *conn, if (state->total_data) { /* Can't use talloc here, the core routines do realloc on the * params and data. */ - if ((state->data = SMB_MALLOC(state->total_data)) == NULL) { + if ((state->data = (char *)SMB_MALLOC(state->total_data)) == NULL) { DEBUG(0,("reply_nttrans: data malloc fail for %u " "bytes !\n", (unsigned int)state->total_data)); TALLOC_FREE(state); @@ -2927,7 +2927,7 @@ int reply_nttrans(connection_struct *conn, if (state->total_param) { /* Can't use talloc here, the core routines do realloc on the * params and data. */ - if ((state->param = SMB_MALLOC(state->total_param)) == NULL) { + if ((state->param = (char *)SMB_MALLOC(state->total_param)) == NULL) { DEBUG(0,("reply_nttrans: param malloc fail for %u " "bytes !\n", (unsigned int)state->total_param)); SAFE_FREE(state->data); @@ -2950,7 +2950,7 @@ int reply_nttrans(connection_struct *conn, if(state->setup_count > 0) { DEBUG(10,("reply_nttrans: state->setup_count = %d\n", state->setup_count)); - state->setup = TALLOC(state, state->setup_count); + state->setup = (uint16 *)TALLOC(state, state->setup_count); if (state->setup == NULL) { DEBUG(0,("reply_nttrans : Out of memory\n")); SAFE_FREE(state->data); diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 5acce13e52..8eb8790975 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -170,8 +170,8 @@ static struct ea_list *get_ea_list_from_file(TALLOC_CTX *mem_ctx, connection_str return NULL; } - for (i = 0, ea_namelist = TALLOC(mem_ctx, ea_namelist_size); i < 6; - ea_namelist = TALLOC_REALLOC_ARRAY(mem_ctx, ea_namelist, char, ea_namelist_size), i++) { + for (i = 0, ea_namelist = TALLOC_ARRAY(mem_ctx, char, ea_namelist_size); i < 6; + ea_namelist = TALLOC_REALLOC_ARRAY(mem_ctx, ea_namelist, char, ea_namelist_size), i++) { if (!ea_namelist) { return NULL; @@ -899,7 +899,7 @@ static int call_trans2open(connection_struct *conn, char *inbuf, char *outbuf, i } /* Realloc the size of parameters and data we will return */ - *pparams = SMB_REALLOC(*pparams, 30); + *pparams = (char *)SMB_REALLOC(*pparams, 30); if(*pparams == NULL ) { return ERROR_NT(NT_STATUS_NO_MEMORY); } |