[dovecot-cvs] dovecot/src/lib-index mail-index-transaction.c, 1.39, 1.40

cras at dovecot.org cras at dovecot.org
Sat Jan 15 15:09:31 EET 2005


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv23199

Modified Files:
	mail-index-transaction.c 
Log Message:
static -> dynamic keyword buffer. It's not actually possible to know the
minimum needed size for the buffer beforehand.



Index: mail-index-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-transaction.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- mail-index-transaction.c	12 Jan 2005 21:26:36 -0000	1.39
+++ mail-index-transaction.c	15 Jan 2005 13:09:27 -0000	1.40
@@ -782,9 +782,8 @@
 	   new ones. build a bitmap pointing to them. keywords are never
 	   removed from index's keyword list. */
 	bitmask_offset = sizeof(k) - sizeof(k.bitmask);
-	keyword_buf =
-		buffer_create_static_hard(default_pool,
-					  bitmask_offset + (count + 7) / 8);
+	keyword_buf = buffer_create_dynamic(default_pool, bitmask_offset +
+					    (count + 7) / 8 + 8);
 	for (i = 0; i < count; i++) {
 		for (j = 0; index->keywords[j] != NULL; j++) {
 			if (strcasecmp(keywords[i], index->keywords[j]) == 0)



More information about the dovecot-cvs mailing list