diff options
author | Volker Lendecke <vl@samba.org> | 2012-02-24 16:16:23 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-02-24 16:34:40 +0100 |
commit | 4708b97ce56d40f5956d88289699fc7139b663f1 (patch) | |
tree | 086cb481c28794f4af49f18c77322725e9563ae8 /source3 | |
parent | 5b7609db56799daf781cf81666e93a3417ad77f2 (diff) | |
download | samba-4708b97ce56d40f5956d88289699fc7139b663f1.tar.gz samba-4708b97ce56d40f5956d88289699fc7139b663f1.tar.bz2 samba-4708b97ce56d40f5956d88289699fc7139b663f1.zip |
s3: Simplify smb_splice_chain
With the last commit, bytes_padding is not set anymore
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/process.c | 15 |
1 files changed, 2 insertions, 13 deletions
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,19 +1873,10 @@ 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 */ |