diff options
author | Jeremy Allison <jra@samba.org> | 2003-04-14 10:30:38 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-04-14 10:30:38 +0000 |
commit | 245397cc0df08755a2fa931bac7c47b6de64d24e (patch) | |
tree | d5a0c66dc63ffd587f258ea742dd607b7bd76a1d | |
parent | 1652670e7966eb37e805a00185886df350e9a2e3 (diff) | |
download | samba-245397cc0df08755a2fa931bac7c47b6de64d24e.tar.gz samba-245397cc0df08755a2fa931bac7c47b6de64d24e.tar.bz2 samba-245397cc0df08755a2fa931bac7c47b6de64d24e.zip |
Fix _smb_setlen to be non {} safe.
Jeremy.
(This used to be commit 35d1e3a5e08d075e7e7d9f7f62d36730853f648a)
-rw-r--r-- | source3/include/smb_macros.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index 45fa23b87d..8efb966d0b 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -182,8 +182,8 @@ #define smb_offset(p,buf) (PTR_DIFF(p,buf+4) + chain_size) #define smb_len(buf) (PVAL(buf,3)|(PVAL(buf,2)<<8)|((PVAL(buf,1)&1)<<16)) -#define _smb_setlen(buf,len) buf[0] = 0; buf[1] = (len&0x10000)>>16; \ - buf[2] = (len&0xFF00)>>8; buf[3] = len&0xFF; +#define _smb_setlen(buf,len) do { buf[0] = 0; buf[1] = (len&0x10000)>>16; \ + buf[2] = (len&0xFF00)>>8; buf[3] = len&0xFF; } while (0) /******************************************************************* find the difference in milliseconds between two struct timeval |