]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Use macros instead of magic '0' and '1' characters.
authorTimo Sirainen <tss@iki.fi>
Mon, 14 Jun 2010 19:41:23 +0000 (20:41 +0100)
committerTimo Sirainen <tss@iki.fi>
Mon, 14 Jun 2010 19:41:23 +0000 (20:41 +0100)
--HG--
branch : HEAD

src/lib-storage/mailbox-list.c

index 79b3ce65c5c766397feb6dde1747c79af081809c..4ff45fcad4e4f788afdd7f52586b10dbe912c949 100644 (file)
@@ -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 @@ const char *mailbox_list_get_unexpanded_path(struct mailbox_list *list,
        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 @@ const char *mailbox_list_get_unexpanded_path(struct mailbox_list *list,
                        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++;
        }