From: Timo Sirainen Date: Thu, 24 Apr 2008 22:29:15 +0000 (+0300) Subject: SIZEOF_ACL_MASK() macro wasn't used as it was intended. Changed so it X-Git-Tag: 1.1.rc5~41 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5c276c7c4853ec32adf7f8ee824c384fa2a22b03;p=thirdparty%2Fdovecot%2Fcore.git SIZEOF_ACL_MASK() macro wasn't used as it was intended. Changed so it allocates enough memory for the struct. --HG-- branch : HEAD --- diff --git a/src/plugins/acl/acl-cache.h b/src/plugins/acl/acl-cache.h index 4a57b21d52..20709ebfca 100644 --- a/src/plugins/acl/acl-cache.h +++ b/src/plugins/acl/acl-cache.h @@ -13,9 +13,8 @@ struct acl_mask { /* 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);