From 4708b97ce56d40f5956d88289699fc7139b663f1 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 24 Feb 2012 16:16:23 +0100 Subject: s3: Simplify smb_splice_chain With the last commit, bytes_padding is not set anymore --- source3/smbd/process.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'source3') diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 3cfb0812d6..72cc3137fb 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1790,7 +1790,6 @@ static bool smb_splice_chain(uint8_t **poutbuf, const uint8_t *andx_buf) size_t old_size, new_size; size_t ofs; size_t chain_padding = 0; - size_t bytes_padding = 0; bool first_request; old_size = talloc_get_size(*poutbuf); @@ -1816,8 +1815,7 @@ static bool smb_splice_chain(uint8_t **poutbuf, const uint8_t *andx_buf) */ new_size = old_size + chain_padding + 1 + wct * sizeof(uint16_t) + 2; - - new_size += bytes_padding + num_bytes; + new_size += num_bytes; if ((smb_command != SMBwriteX) && (new_size > 0xffff)) { DEBUG(1, ("smb_splice_chain: %u bytes won't fit\n", @@ -1875,18 +1873,9 @@ static bool smb_splice_chain(uint8_t **poutbuf, const uint8_t *andx_buf) * bcc (byte count) */ - SSVAL(outbuf, ofs, num_bytes + bytes_padding); + SSVAL(outbuf, ofs, num_bytes); ofs += sizeof(uint16_t); - /* - * padding - */ - - if (bytes_padding != 0) { - memset(outbuf + ofs, 0, bytes_padding); - ofs += bytes_padding; - } - /* * The bytes field */ -- cgit