s3: Simplify smb_splice_chain
authorVolker Lendecke <vl@samba.org>
Fri, 24 Feb 2012 15:16:23 +0000 (16:16 +0100)
committerVolker Lendecke <vl@samba.org>
Fri, 24 Feb 2012 17:07:48 +0000 (18:07 +0100)
No code change, just remove a {} block left over as the else branch
from the previous commit

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri Feb 24 18:07:48 CET 2012 on sn-devel-104

source3/smbd/process.c

index bdfc10d2bd3620ab74b5493482a9d02a47c50c79..391ddc70bafbe808130b686b2a98e91374c1fb6e 100644 (file)
@@ -1790,6 +1790,8 @@ 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 andx_cmd_ofs;
+
 
        old_size = talloc_get_size(*poutbuf);
 
@@ -1822,25 +1824,20 @@ static bool smb_splice_chain(uint8_t **poutbuf, const uint8_t *andx_buf)
        }
        *poutbuf = outbuf;
 
-       {
-               size_t andx_cmd_ofs;
-
-               if (!find_andx_cmd_ofs(outbuf, &andx_cmd_ofs)) {
-                       DEBUG(1, ("invalid command chain\n"));
-                       *poutbuf = talloc_realloc(
-                               NULL, *poutbuf, uint8_t, old_size);
-                       return false;
-               }
-
-               if (chain_padding != 0) {
-                       memset(outbuf + old_size, 0, chain_padding);
-                       old_size += chain_padding;
-               }
+       if (!find_andx_cmd_ofs(outbuf, &andx_cmd_ofs)) {
+               DEBUG(1, ("invalid command chain\n"));
+               *poutbuf = talloc_realloc(NULL, *poutbuf, uint8_t, old_size);
+               return false;
+       }
 
-               SCVAL(outbuf, andx_cmd_ofs, smb_command);
-               SSVAL(outbuf, andx_cmd_ofs + 2, old_size - 4);
+       if (chain_padding != 0) {
+               memset(outbuf + old_size, 0, chain_padding);
+               old_size += chain_padding;
        }
 
+       SCVAL(outbuf, andx_cmd_ofs, smb_command);
+       SSVAL(outbuf, andx_cmd_ofs + 2, old_size - 4);
+
        ofs = old_size;
 
        /*