summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-02-24 16:16:23 +0100
committerVolker Lendecke <vl@samba.org>2012-02-24 16:34:35 +0100
commit5b7609db56799daf781cf81666e93a3417ad77f2 (patch)
tree522b7f5526959ba8f5780a5a674a3d62431f7881 /source3
parentda322e4f3f0967bd65ec0f4cfbea83d9e8ccd77e (diff)
downloadsamba-5b7609db56799daf781cf81666e93a3417ad77f2.tar.gz
samba-5b7609db56799daf781cf81666e93a3417ad77f2.tar.bz2
samba-5b7609db56799daf781cf81666e93a3417ad77f2.zip
s3: Simplify smb_splice_chain
bytes_alignment used to be used in libsmb, which uses different code now
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/process.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 3b94d4a56d..3cfb0812d6 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1783,7 +1783,6 @@ static bool smb_splice_chain(uint8_t **poutbuf, const uint8_t *andx_buf)
uint8_t smb_command = CVAL(andx_buf, smb_com);
uint8_t wct = CVAL(andx_buf, smb_wct);
const uint16_t *vwv = (const uint16_t *)(andx_buf + smb_vwv);
- size_t bytes_alignment = 0;
uint32_t num_bytes = smb_buflen(andx_buf);
const uint8_t *bytes = (const uint8_t *)smb_buf(andx_buf);
@@ -1813,16 +1812,11 @@ static bool smb_splice_chain(uint8_t **poutbuf, const uint8_t *andx_buf)
/*
* After the old request comes the new wct field (1 byte), the vwv's
- * and the num_bytes field. After at we might need to align the bytes
- * given to us to "bytes_alignment", increasing the num_bytes value.
+ * and the num_bytes field.
*/
new_size = old_size + chain_padding + 1 + wct * sizeof(uint16_t) + 2;
- if ((bytes_alignment != 0) && ((new_size % bytes_alignment) != 0)) {
- bytes_padding = bytes_alignment - (new_size % bytes_alignment);
- }
-
new_size += bytes_padding + num_bytes;
if ((smb_command != SMBwriteX) && (new_size > 0xffff)) {