dovecot-2.2: lib-storage: Removed unnecessary code.

dovecot at dovecot.org dovecot at dovecot.org
Thu May 8 14:03:10 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/9e3e46409415
changeset: 17359:9e3e46409415
user:      Timo Sirainen <tss at iki.fi>
date:      Thu May 08 17:02:19 2014 +0300
description:
lib-storage: Removed unnecessary code.
mailbox_dir_name is never NULL, and when it's empty it can be handled
exactly the same as when it's non-empty.

diffstat:

 src/lib-storage/list/mailbox-list-index-backend.c |  11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diffs (21 lines):

diff -r f101636138fa -r 9e3e46409415 src/lib-storage/list/mailbox-list-index-backend.c
--- a/src/lib-storage/list/mailbox-list-index-backend.c	Thu May 08 15:11:26 2014 +0300
+++ b/src/lib-storage/list/mailbox-list-index-backend.c	Thu May 08 17:02:19 2014 +0300
@@ -85,14 +85,9 @@
 index_get_guid_path(struct mailbox_list *_list, const char *root_dir,
 		    const guid_128_t mailbox_guid)
 {
-	if (_list->set.mailbox_dir_name == '\0') {
-		return t_strconcat(root_dir, "/",
-				   guid_128_to_string(mailbox_guid), NULL);
-	} else {
-		return t_strdup_printf("%s/%s%s", root_dir,
-				       _list->set.mailbox_dir_name,
-				       guid_128_to_string(mailbox_guid));
-	}
+	return t_strdup_printf("%s/%s%s", root_dir,
+			       _list->set.mailbox_dir_name,
+			       guid_128_to_string(mailbox_guid));
 }
 
 static int


More information about the dovecot-cvs mailing list