changeset 2318:4e925eb04b10 HEAD

Use CMP_DEV_T() macro to compare struct stat.st_dev
author Timo Sirainen <tss@iki.fi>
date Mon, 12 Jul 2004 00:09:30 +0300
parents 0cf316c77b1b
children 7c7e372da1f3
files src/lib-index/mail-transaction-log.c src/lib-storage/index/index-storage.c
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-transaction-log.c	Mon Jul 12 00:04:46 2004 +0300
+++ b/src/lib-index/mail-transaction-log.c	Mon Jul 12 00:09:30 2004 +0300
@@ -360,7 +360,7 @@
 		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 @@
 
 	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) {
--- a/src/lib-storage/index/index-storage.c	Mon Jul 12 00:04:46 2004 +0300
+++ b/src/lib-storage/index/index-storage.c	Mon Jul 12 00:09:30 2004 +0300
@@ -94,7 +94,7 @@
 		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++;