dovecot-1.1: SIZEOF_ACL_MASK() macro wasn't used as it was inten...

dovecot at dovecot.org dovecot at dovecot.org
Fri Apr 25 01:31:10 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/bf99bd33d69b
changeset: 7461:bf99bd33d69b
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Apr 25 01:29:15 2008 +0300
description:
SIZEOF_ACL_MASK() macro wasn't used as it was intended. Changed so it
allocates enough memory for the struct.

diffstat:

1 file changed, 2 insertions(+), 3 deletions(-)
src/plugins/acl/acl-cache.h |    5 ++---

diffs (15 lines):

diff -r e1fe3d080314 -r bf99bd33d69b src/plugins/acl/acl-cache.h
--- 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 @@ 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);


More information about the dovecot-cvs mailing list