dovecot-2.0: acl: Updating empty ACL to empty triggered unnecess...
    dovecot at dovecot.org 
    dovecot at dovecot.org
       
    Mon Apr  5 08:57:25 EEST 2010
    
    
  
details:   http://hg.dovecot.org/dovecot-2.0/rev/960a01833e4c
changeset: 11069:960a01833e4c
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Apr 05 08:57:19 2010 +0300
description:
acl: Updating empty ACL to empty triggered unnecessary disk write.
diffstat:
 src/plugins/acl/acl-backend-vfile.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diffs (25 lines):
diff -r a65dbdedb202 -r 960a01833e4c src/plugins/acl/acl-backend-vfile.c
--- a/src/plugins/acl/acl-backend-vfile.c	Mon Apr 05 08:45:06 2010 +0300
+++ b/src/plugins/acl/acl-backend-vfile.c	Mon Apr 05 08:57:19 2010 +0300
@@ -899,7 +899,7 @@
 			      enum acl_modify_mode modify_mode)
 {
 	const char *const *old_rights = *rightsp;
-	const char *const *new_rights;
+	const char *const *new_rights = NULL;
 	const char *null = NULL;
 	ARRAY_TYPE(const_string) rights;
 	unsigned int i, j;
@@ -945,10 +945,11 @@
 		*rightsp = NULL;
 		return TRUE;
 	}
+	i_assert(new_rights != NULL);
 	*rightsp = new_rights;
 
 	if (old_rights == NULL)
-		return new_rights != NULL;
+		return new_rights[0] != NULL;
 
 	/* see if anything changed */
 	for (i = 0; old_rights[i] != NULL && new_rights[i] != NULL; i++) {
    
    
More information about the dovecot-cvs
mailing list