summaryrefslogtreecommitdiff
path: root/source3/include/smb_macros.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-08-23 15:51:28 +0000
committerJeremy Allison <jra@samba.org>2002-08-23 15:51:28 +0000
commit9c31d189875c3d95e46df6210d70c48f202e3c4a (patch)
treead87720dc104d3e8d2aa21531afa871f70e8f1a9 /source3/include/smb_macros.h
parentd5dd9dcc3f2f7ca9c6ccbb0b2d193b165b3c0c76 (diff)
downloadsamba-9c31d189875c3d95e46df6210d70c48f202e3c4a.tar.gz
samba-9c31d189875c3d95e46df6210d70c48f202e3c4a.tar.bz2
samba-9c31d189875c3d95e46df6210d70c48f202e3c4a.zip
Merged initial allocation code for IFSTEST fix.
Jeremy. (This used to be commit 095e2bf9469a4c26814fb049f2870983c090ed81)
Diffstat (limited to 'source3/include/smb_macros.h')
-rw-r--r--source3/include/smb_macros.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index a2351c705e..ccf151fab2 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -165,8 +165,7 @@
/* this is how errors are generated */
#define UNIXERROR(defclass,deferror) unix_error_packet(outbuf,defclass,deferror,__LINE__,__FILE__)
-#define SMB_ROUNDUP(x,g) (((x)+((g)-1))&~((g)-1))
-#define SMB_ROUNDUP_ALLOCATION(s) ((s) ? (SMB_ROUNDUP((SMB_OFF_T)((s)+1), ((SMB_OFF_T)SMB_ROUNDUP_ALLOCATION_SIZE))) : 0 )
+#define SMB_ROUNDUP(x,r) ( ((x)%(r)) ? ( (((x)+(r))/(r))*(r) ) : (x))
/* Extra macros added by Ying Chen at IBM - speed increase by inlining. */
#define smb_buf(buf) (((char *)(buf)) + smb_size + CVAL(buf,smb_wct)*2)