summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-02-23 10:50:46 +0100
committerVolker Lendecke <vl@samba.org>2012-02-23 12:37:22 +0100
commitf1dc8b28b7323aa5d44df6bd8d1fbcece91cc397 (patch)
tree0d99a57ced5ae85f1b8e0ae9b0dc73df2d7d0e42
parent6f8f24c5f2564cf0d0f742af556e3f641803efbd (diff)
downloadsamba-f1dc8b28b7323aa5d44df6bd8d1fbcece91cc397.tar.gz
samba-f1dc8b28b7323aa5d44df6bd8d1fbcece91cc397.tar.bz2
samba-f1dc8b28b7323aa5d44df6bd8d1fbcece91cc397.zip
s3: smb_request->vwv can be const
Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Thu Feb 23 12:37:23 CET 2012 on sn-devel-104
-rw-r--r--source3/include/smb.h2
-rw-r--r--source3/smbd/process.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 7dd77ec5da..10e47984a8 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -452,7 +452,7 @@ struct smb_request {
uint16 vuid;
uint16 tid;
uint8 wct;
- uint16_t *vwv;
+ const uint16_t *vwv;
uint16_t buflen;
const uint8_t *buf;
const uint8 *inbuf;
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 139f1f0d22..3cb44c4137 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -529,7 +529,7 @@ static bool init_smb_request(struct smb_request *req,
req->vuid = SVAL(inbuf, smb_uid);
req->tid = SVAL(inbuf, smb_tid);
req->wct = CVAL(inbuf, smb_wct);
- req->vwv = discard_const_p(uint16_t, (inbuf+smb_vwv));
+ req->vwv = (const uint16_t *)(inbuf+smb_vwv);
req->buflen = smb_buflen(inbuf);
req->buf = (const uint8_t *)smb_buf_const(inbuf);
req->unread_bytes = unread_bytes;