diff options
author | Jeremy Allison <jra@samba.org> | 2001-11-12 01:00:54 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-11-12 01:00:54 +0000 |
commit | 22afba62c9add7efa0de76defd8abb9b352473e2 (patch) | |
tree | 87da606a833a7496b5b5d36762544d40ab34ebdd /source3/include | |
parent | 84244244710790f2058ee90b2dc80e9c252841dd (diff) | |
download | samba-22afba62c9add7efa0de76defd8abb9b352473e2.tar.gz samba-22afba62c9add7efa0de76defd8abb9b352473e2.tar.bz2 samba-22afba62c9add7efa0de76defd8abb9b352473e2.zip |
Fixed allocation bug in database prog. Some format fixes.
Jeremy.
(This used to be commit 9ff6b0c20cc88ef0bcd62a596fcb96f898b5b29d)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/local.h | 3 | ||||
-rw-r--r-- | source3/include/smb_macros.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/source3/include/local.h b/source3/include/local.h index 53ef564610..84f5a3d1df 100644 --- a/source3/include/local.h +++ b/source3/include/local.h @@ -189,4 +189,7 @@ /* the maximum age in seconds of a password. Should be a lp_ parameter */ #define MAX_PASSWORD_AGE (21*24*60*60) +/* Allocation roundup. */ +#define SMB_ROUNDUP_ALLOCATION_SIZE 0x100000 + #endif diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index 42d66b676a..44b8c26da9 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -159,6 +159,7 @@ #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) (SMB_ROUNDUP((SMB_OFF_T)((s)+1), ((SMB_OFF_T)SMB_ROUNDUP_ALLOCATION_SIZE))) /* Extra macros added by Ying Chen at IBM - speed increase by inlining. */ #define smb_buf(buf) (buf + smb_size + CVAL(buf,smb_wct)*2) |