From 5b7609db56799daf781cf81666e93a3417ad77f2 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 24 Feb 2012 16:16:23 +0100 Subject: [PATCH] s3: Simplify smb_splice_chain bytes_alignment used to be used in libsmb, which uses different code now --- source3/smbd/process.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 3b94d4a56d5..3cfb0812d63 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)) { -- 2.34.1