Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7461:bf99bd33d69b HEAD
SIZEOF_ACL_MASK() macro wasn't used as it was intended. Changed so it
allocates enough memory for the struct.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 25 Apr 2008 01:29:15 +0300 |
parents | e1fe3d080314 |
children | 068f6eefc62b |
files | src/plugins/acl/acl-cache.h |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/acl/acl-cache.h Fri Apr 25 00:52:56 2008 +0300 +++ b/src/plugins/acl/acl-cache.h Fri Apr 25 01:29:15 2008 +0300 @@ -13,9 +13,8 @@ /* variable length bitmask */ unsigned char mask[1]; }; -#define SIZEOF_ACL_MASK(count) \ - (sizeof(pool_t) + sizeof(unsigned int) + \ - (count + CHAR_BIT-1) / CHAR_BIT) +#define SIZEOF_ACL_MASK(bitmask_size) \ + (sizeof(pool_t) + sizeof(unsigned int) + (bitmask_size)) struct acl_cache *acl_cache_init(struct acl_backend *backend, size_t validity_rec_size);