[dovecot-cvs] dovecot/src/lib-index mail-transaction-log.c, 1.46, 1.47

cras at dovecot.org cras at dovecot.org
Mon Jul 12 00:09:33 EEST 2004


Update of /home/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv9451/lib-index

Modified Files:
	mail-transaction-log.c 
Log Message:
Use CMP_DEV_T() macro to compare struct stat.st_dev



Index: mail-transaction-log.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-transaction-log.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- mail-transaction-log.c	4 Jul 2004 22:19:49 -0000	1.46
+++ mail-transaction-log.c	11 Jul 2004 21:09:30 -0000	1.47
@@ -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) {



More information about the dovecot-cvs mailing list