summaryrefslogtreecommitdiff
path: root/source3/libsmb/clireadwrite.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/clireadwrite.c')
-rw-r--r--source3/libsmb/clireadwrite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index ff3dcff773..fcfb01268c 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -197,7 +197,7 @@ static void cli_read_andx_done(struct tevent_req *subreq)
return;
}
- state->buf = (uint8_t *)smb_base(inbuf) + SVAL(vwv+6, 0);
+ state->buf = discard_const_p(uint8_t, smb_base(inbuf)) + SVAL(vwv+6, 0);
if (trans_oob(smb_len(inbuf), SVAL(vwv+6, 0), state->received)
|| ((state->received != 0) && (state->buf < bytes))) {
@@ -824,7 +824,7 @@ struct tevent_req *cli_write_andx_create(TALLOC_CTX *mem_ctx,
state->pad = 0;
state->iov[0].iov_base = (void *)&state->pad;
state->iov[0].iov_len = 1;
- state->iov[1].iov_base = CONST_DISCARD(void *, buf);
+ state->iov[1].iov_base = discard_const_p(void, buf);
state->iov[1].iov_len = size;
subreq = cli_smb_req_create(state, ev, cli, SMBwriteX, 0, wct, vwv,