dovecot-2.0: lib-storage: Use macros instead of magic '0' and '1...

dovecot at dovecot.org dovecot at dovecot.org
Mon Jun 14 22:41:26 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/d24cd07babb6
changeset: 11547:d24cd07babb6
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jun 14 20:41:23 2010 +0100
description:
lib-storage: Use macros instead of magic '0' and '1' characters.

diffstat:

 src/lib-storage/mailbox-list.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r 6e1247609440 -r d24cd07babb6 src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c	Mon Jun 14 20:39:06 2010 +0100
+++ b/src/lib-storage/mailbox-list.c	Mon Jun 14 20:41:23 2010 +0100
@@ -13,6 +13,7 @@
 #include "write-full.h"
 #include "safe-mkstemp.h"
 #include "unlink-directory.h"
+#include "settings-parser.h"
 #include "imap-match.h"
 #include "imap-utf7.h"
 #include "mailbox-log.h"
@@ -315,12 +316,12 @@
 	struct mailbox_list_settings set;
 	const char *p, *error;
 
-	if (*location == '1') {
+	if (*location == SETTING_STRVAR_EXPANDED[0]) {
 		/* set using -o or userdb lookup. */
 		return "";
 	}
 
-	i_assert(*location == '0');
+	i_assert(*location == SETTING_STRVAR_UNEXPANDED[0]);
 	location++;
 
 	if (*location == '\0') {
@@ -328,9 +329,9 @@
 			user->unexpanded_set, MAIL_STORAGE_SET_DRIVER_NAME);
 		i_assert(mail_set != NULL);
 		location = mail_set->mail_location;
-		if (*location == '1')
+		if (*location == SETTING_STRVAR_EXPANDED[0])
 			return "";
-		i_assert(*location == '0');
+		i_assert(*location == SETTING_STRVAR_UNEXPANDED[0]);
 		location++;
 	}
 


More information about the dovecot-cvs mailing list