]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Use CMP_DEV_T() macro to compare struct stat.st_dev
authorTimo Sirainen <tss@iki.fi>
Sun, 11 Jul 2004 21:09:30 +0000 (00:09 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 11 Jul 2004 21:09:30 +0000 (00:09 +0300)
--HG--
branch : HEAD

src/lib-index/mail-transaction-log.c
src/lib-storage/index/index-storage.c

index 82fcd699bd1b68792802f419425d848788660a4b..275f619ebd8fd3b48b838e70515a096d9ea7a166 100644 (file)
@@ -360,7 +360,7 @@ mail_transaction_log_file_create2(struct mail_transaction_log *log,
                if ((ret = fstat(fd2, &st)) < 0) {
                        mail_index_file_set_syscall_error(index, path,
                                                          "fstat()");
-               } else if (st.st_dev == dev && st.st_ino == ino) {
+               } else if (st.st_ino == ino && CMP_DEV_T(st.st_dev, dev)) {
                        /* same file, still broken */
                } else {
                        (void)file_dotlock_delete(path, LOG_NEW_DOTLOCK_SUFFIX,
@@ -626,7 +626,7 @@ static int mail_transaction_log_refresh(struct mail_transaction_log *log)
 
        if (log->head != NULL &&
            log->head->st_ino == st.st_ino &&
-           log->head->st_dev == st.st_dev) {
+           CMP_DEV_T(log->head->st_dev, st.st_dev)) {
                /* same file */
                ret = mail_transaction_log_file_read_hdr(log->head, &st);
                if (ret == 0 && log->head->lock_type == F_WRLCK) {
index 9060c4943378bb692e5db931aa463faa4492e9e5..97f976032c52c51ae9d1e7e27357ce0d659c9161 100644 (file)
@@ -94,7 +94,7 @@ index_storage_alloc(const char *index_dir, const char *mailbox_path,
                rec = *list;
 
                if ((index_dir != NULL && st.st_ino == rec->index_dir_ino &&
-                    st.st_dev == rec->index_dir_dev) ||
+                    CMP_DEV_T(st.st_dev, rec->index_dir_dev)) ||
                    (index_dir == NULL && st.st_ino == 0 &&
                     strcmp(mailbox_path, rec->mailbox_path) == 0)) {
                        rec->refcount++;