fixed a problem with the smb_buf() macro on some compilers
authorAndrew Tridgell <tridge@samba.org>
Tue, 16 Apr 2002 13:10:54 +0000 (13:10 +0000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 16 Apr 2002 13:10:54 +0000 (13:10 +0000)
source/include/smb_macros.h

index 27a59616512875061c0719dfcda5e1d6daed69b1..a2351c705eaede2d1e14f8f71e894540ea38fe8d 100644 (file)
 #define SMB_ROUNDUP_ALLOCATION(s) ((s) ? (SMB_ROUNDUP((SMB_OFF_T)((s)+1), ((SMB_OFF_T)SMB_ROUNDUP_ALLOCATION_SIZE))) : 0 )
 
 /* Extra macros added by Ying Chen at IBM - speed increase by inlining. */
-#define smb_buf(buf) ((buf) + smb_size + CVAL(buf,smb_wct)*2)
+#define smb_buf(buf) (((char *)(buf)) + smb_size + CVAL(buf,smb_wct)*2)
 #define smb_buflen(buf) (SVAL(buf,smb_vwv0 + (int)CVAL(buf, smb_wct)*2))
 
 /* the remaining number of bytes in smb buffer 'buf' from pointer 'p'. */