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 | 9ff6b0c20cc88ef0bcd62a596fcb96f898b5b29d (patch) | |
tree | d4a20ae4bf0c8b22a1d29ac400f90fee6a26c12a /source/include | |
parent | 8bb5cb27c2012b8967482255d48a1b48d3acd9db (diff) | |
download | samba-9ff6b0c20cc88ef0bcd62a596fcb96f898b5b29d.tar.gz samba-9ff6b0c20cc88ef0bcd62a596fcb96f898b5b29d.tar.xz samba-9ff6b0c20cc88ef0bcd62a596fcb96f898b5b29d.zip |
Fixed allocation bug in database prog. Some format fixes.
Jeremy.
Diffstat (limited to 'source/include')
-rw-r--r-- | source/include/local.h | 3 | ||||
-rw-r--r-- | source/include/smb_macros.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/source/include/local.h b/source/include/local.h index 53ef564610b..84f5a3d1dff 100644 --- a/source/include/local.h +++ b/source/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/source/include/smb_macros.h b/source/include/smb_macros.h index 42d66b676a8..44b8c26da94 100644 --- a/source/include/smb_macros.h +++ b/source/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) |