From f132ad32cc3cf81f0f6ea7d3a586b5ecec77edc8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 21 Nov 2011 17:43:11 +0100 Subject: s4:libcli/smb2: fix compiler warning in smb2_push_o16s16_string() metze --- source4/libcli/smb2/request.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4') 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); -- cgit