From 6cf69fee189857ae6f85cd3f81a6a58364839942 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 7 Sep 2007 13:31:15 +0000 Subject: r24994: Fix some C++ warnings. (This used to be commit 925abf74fa1ed5ae726bae8781ec549302786b39) --- source4/libcli/raw/clitransport.c | 2 +- source4/libcli/raw/rawfileinfo.c | 2 +- source4/libcli/raw/rawrequest.c | 2 +- source4/libcli/raw/rawtrans.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/libcli/raw') 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; -- cgit