summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-11-21 17:43:11 +0100
committerStefan Metzmacher <metze@samba.org>2011-11-24 19:02:33 +0100
commitf132ad32cc3cf81f0f6ea7d3a586b5ecec77edc8 (patch)
treee9445a87df7d03bec12b881ce6fd5f5415f8148c /source4/libcli
parent300343d16c2d7f1f10bbd3c5e484131bf8fa5dfc (diff)
downloadsamba-f132ad32cc3cf81f0f6ea7d3a586b5ecec77edc8.tar.gz
samba-f132ad32cc3cf81f0f6ea7d3a586b5ecec77edc8.tar.bz2
samba-f132ad32cc3cf81f0f6ea7d3a586b5ecec77edc8.zip
s4:libcli/smb2: fix compiler warning in smb2_push_o16s16_string()
metze
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/smb2/request.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/libcli/smb2/request.c b/source4/libcli/smb2/request.c
index fae995a396..a2d633f855 100644
--- a/source4/libcli/smb2/request.c
+++ b/source4/libcli/smb2/request.c
@@ -689,6 +689,7 @@ NTSTATUS smb2_push_o16s16_string(struct smb2_request_buffer *buf,
DATA_BLOB blob;
NTSTATUS status;
bool ret;
+ void *ptr = NULL;
if (str == NULL) {
return smb2_push_o16s16_blob(buf, ofs, data_blob(NULL, 0));
@@ -701,10 +702,11 @@ NTSTATUS smb2_push_o16s16_string(struct smb2_request_buffer *buf,
}
ret = convert_string_talloc(buf->buffer, CH_UNIX, CH_UTF16,
- str, strlen(str), (void **)&blob.data, &blob.length);
+ str, strlen(str), &ptr, &blob.length);
if (!ret) {
return NT_STATUS_ILLEGAL_CHARACTER;
}
+ blob.data = (uint8_t *)ptr;
status = smb2_push_o16s16_blob(buf, ofs, blob);
data_blob_free(&blob);