summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/clideltree.c2
-rw-r--r--source4/libcli/clireadwrite.c6
-rw-r--r--source4/libcli/raw/clitransport.c2
-rw-r--r--source4/libcli/raw/rawfileinfo.c2
-rw-r--r--source4/libcli/raw/rawrequest.c2
-rw-r--r--source4/libcli/raw/rawtrans.c4
-rw-r--r--source4/libcli/smb2/request.c2
-rw-r--r--source4/libcli/smb_composite/appendacl.c2
-rw-r--r--source4/libcli/smb_composite/loadfile.c2
-rw-r--r--source4/libcli/smb_composite/savefile.c2
-rw-r--r--source4/libcli/smb_composite/sesssetup.c2
11 files changed, 14 insertions, 14 deletions
diff --git a/source4/libcli/clideltree.c b/source4/libcli/clideltree.c
index 33c39ea093..d191bd277a 100644
--- a/source4/libcli/clideltree.c
+++ b/source4/libcli/clideltree.c
@@ -33,7 +33,7 @@ struct delete_state {
*/
static void delete_fn(struct clilist_file_info *finfo, const char *name, void *state)
{
- struct delete_state *dstate = state;
+ struct delete_state *dstate = (struct delete_state *)state;
char *s, *n;
if (ISDOT(finfo->name) || ISDOTDOT(finfo->name)) {
return;
diff --git a/source4/libcli/clireadwrite.c b/source4/libcli/clireadwrite.c
index 10a1c75308..e6e66ef36e 100644
--- a/source4/libcli/clireadwrite.c
+++ b/source4/libcli/clireadwrite.c
@@ -27,7 +27,7 @@
ssize_t smbcli_read(struct smbcli_tree *tree, int fnum, void *_buf, off_t offset,
size_t size)
{
- uint8_t *buf = _buf;
+ uint8_t *buf = (uint8_t *)_buf;
union smb_read parms;
int readsize;
ssize_t total = 0;
@@ -87,7 +87,7 @@ ssize_t smbcli_write(struct smbcli_tree *tree,
int fnum, uint16_t write_mode,
const void *_buf, off_t offset, size_t size)
{
- const uint8_t *buf = _buf;
+ const uint8_t *buf = (const uint8_t *)_buf;
union smb_write parms;
int block = (tree->session->transport->negotiate.max_xmit - (MIN_SMB_SIZE+32));
ssize_t total = 0;
@@ -133,7 +133,7 @@ ssize_t smbcli_write(struct smbcli_tree *tree,
ssize_t smbcli_smbwrite(struct smbcli_tree *tree,
int fnum, const void *_buf, off_t offset, size_t size1)
{
- const uint8_t *buf = _buf;
+ const uint8_t *buf = (const uint8_t *)_buf;
union smb_write parms;
ssize_t total = 0;
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index 98f5042d99..0482b04f24 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -635,7 +635,7 @@ NTSTATUS smb_raw_echo_recv(struct smbcli_request *req, TALLOC_CTX *mem_ctx,
p->out.sequence_number = SVAL(req->in.vwv, VWV(0));
p->out.size = req->in.data_size;
talloc_free(p->out.data);
- p->out.data = talloc_size(mem_ctx, p->out.size);
+ p->out.data = talloc_array(mem_ctx, uint8_t, p->out.size);
NT_STATUS_HAVE_NO_MEMORY(p->out.data);
if (!smbcli_raw_pull_data(req, req->in.data, p->out.size, p->out.data)) {
diff --git a/source4/libcli/raw/rawfileinfo.c b/source4/libcli/raw/rawfileinfo.c
index faae3a52b1..8481995c1a 100644
--- a/source4/libcli/raw/rawfileinfo.c
+++ b/source4/libcli/raw/rawfileinfo.c
@@ -66,7 +66,7 @@ NTSTATUS smbcli_parse_stream_info(DATA_BLOB blob, TALLOC_CTX *mem_ctx,
if (size == -1) {
return NT_STATUS_ILLEGAL_CHARACTER;
}
- io->streams[n].stream_name.s = vstr;
+ io->streams[n].stream_name.s = (const char *)vstr;
io->streams[n].stream_name.private_length = nlen;
io->num_streams++;
len = IVAL(blob.data, ofs);
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 6bf2bb58cc..778b896abd 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -83,7 +83,7 @@ struct smbcli_request *smbcli_request_setup_nonsmb(struct smbcli_transport *tran
/* over allocate by a small amount */
req->out.allocated = req->out.size + REQ_OVER_ALLOCATION;
- req->out.buffer = talloc_size(req, req->out.allocated);
+ req->out.buffer = talloc_array(req, uint8_t, req->out.allocated);
if (!req->out.buffer) {
return NULL;
}
diff --git a/source4/libcli/raw/rawtrans.c b/source4/libcli/raw/rawtrans.c
index fe26a71310..40a30bd067 100644
--- a/source4/libcli/raw/rawtrans.c
+++ b/source4/libcli/raw/rawtrans.c
@@ -86,7 +86,7 @@ NTSTATUS smb_raw_trans2_recv(struct smbcli_request *req,
/* allocate it */
if (total_data != 0) {
- tdata = talloc_size(mem_ctx, total_data);
+ tdata = talloc_array(mem_ctx, uint8_t, total_data);
if (!tdata) {
DEBUG(0,("smb_raw_receive_trans: failed to enlarge data buffer to %d bytes\n", total_data));
req->status = NT_STATUS_NO_MEMORY;
@@ -96,7 +96,7 @@ NTSTATUS smb_raw_trans2_recv(struct smbcli_request *req,
}
if (total_param != 0) {
- tparam = talloc_size(mem_ctx, total_param);
+ tparam = talloc_array(mem_ctx, uint8_t, total_param);
if (!tparam) {
DEBUG(0,("smb_raw_receive_trans: failed to enlarge param buffer to %d bytes\n", total_param));
req->status = NT_STATUS_NO_MEMORY;
diff --git a/source4/libcli/smb2/request.c b/source4/libcli/smb2/request.c
index d857fc8c5b..392fec1cb9 100644
--- a/source4/libcli/smb2/request.c
+++ b/source4/libcli/smb2/request.c
@@ -229,7 +229,7 @@ static NTSTATUS smb2_grow_buffer(struct smb2_request_buffer *buf, size_t increas
dynamic_ofs = buf->dynamic - buf->buffer;
- buffer_ptr = talloc_realloc_size(buf, buf->buffer, newsize);
+ buffer_ptr = talloc_realloc(buf, buf->buffer, uint8_t, newsize);
NT_STATUS_HAVE_NO_MEMORY(buffer_ptr);
buf->buffer = buffer_ptr;
diff --git a/source4/libcli/smb_composite/appendacl.c b/source4/libcli/smb_composite/appendacl.c
index f82714de5b..0fda8c4d65 100644
--- a/source4/libcli/smb_composite/appendacl.c
+++ b/source4/libcli/smb_composite/appendacl.c
@@ -187,7 +187,7 @@ static NTSTATUS appendacl_close(struct composite_context *c,
*/
static void appendacl_handler(struct smbcli_request *req)
{
- struct composite_context *c = req->async.private;
+ struct composite_context *c = (struct composite_context *)req->async.private;
struct appendacl_state *state = talloc_get_type(c->private_data, struct appendacl_state);
/* when this handler is called, the stage indicates what
diff --git a/source4/libcli/smb_composite/loadfile.c b/source4/libcli/smb_composite/loadfile.c
index 9b65d04ef3..d42d3329b6 100644
--- a/source4/libcli/smb_composite/loadfile.c
+++ b/source4/libcli/smb_composite/loadfile.c
@@ -180,7 +180,7 @@ static NTSTATUS loadfile_close(struct composite_context *c,
*/
static void loadfile_handler(struct smbcli_request *req)
{
- struct composite_context *c = req->async.private;
+ struct composite_context *c = (struct composite_context *)req->async.private;
struct loadfile_state *state = talloc_get_type(c->private_data, struct loadfile_state);
/* when this handler is called, the stage indicates what
diff --git a/source4/libcli/smb_composite/savefile.c b/source4/libcli/smb_composite/savefile.c
index 32fcdbcd87..b94be9e9b1 100644
--- a/source4/libcli/smb_composite/savefile.c
+++ b/source4/libcli/smb_composite/savefile.c
@@ -180,7 +180,7 @@ static NTSTATUS savefile_close(struct composite_context *c,
*/
static void savefile_handler(struct smbcli_request *req)
{
- struct composite_context *c = req->async.private;
+ struct composite_context *c = (struct composite_context *)req->async.private;
struct savefile_state *state = talloc_get_type(c->private_data, struct savefile_state);
/* when this handler is called, the stage indicates what
diff --git a/source4/libcli/smb_composite/sesssetup.c b/source4/libcli/smb_composite/sesssetup.c
index 25cf8b3f12..579706261a 100644
--- a/source4/libcli/smb_composite/sesssetup.c
+++ b/source4/libcli/smb_composite/sesssetup.c
@@ -76,7 +76,7 @@ static void set_user_session_key(struct smbcli_session *session,
*/
static void request_handler(struct smbcli_request *req)
{
- struct composite_context *c = req->async.private;
+ struct composite_context *c = (struct composite_context *)req->async.private;
struct sesssetup_state *state = talloc_get_type(c->private_data, struct sesssetup_state);
struct smbcli_session *session = req->session;
DATA_BLOB session_key = data_blob(NULL, 0);