dovecot-2.0: Static analyzer warning fix.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Oct 21 21:04:08 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/a6eb233ac3ba
changeset: 12335:a6eb233ac3ba
user: Timo Sirainen <tss at iki.fi>
date: Thu Oct 21 19:03:39 2010 +0100
description:
Static analyzer warning fix.
diffstat:
src/doveadm/doveadm-sis.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (28 lines):
diff -r d9a66fa6e206 -r a6eb233ac3ba src/doveadm/doveadm-sis.c
--- a/src/doveadm/doveadm-sis.c Thu Oct 21 18:59:22 2010 +0100
+++ b/src/doveadm/doveadm-sis.c Thu Oct 21 19:03:39 2010 +0100
@@ -34,6 +34,8 @@
struct stat st1, st2;
int fd1, fd2, ret = -1;
+ *path2_inode_r = 0;
+
/* do a byte-by-byte comparison for the files to find out if they're
the same or if this is a hash collision */
fd1 = open(path1, O_RDONLY);
@@ -79,6 +81,7 @@
i_error("read(%s) failed: %m", path1);
else if (ret1 == 0)
ret = 1;
+ *path2_inode_r = st2.st_ino;
}
if (close(fd1) < 0)
@@ -86,7 +89,6 @@
if (close(fd2) < 0)
i_error("close(%s) failed: %m", path2);
- *path2_inode_r = st2.st_ino;
return ret;
}
More information about the dovecot-cvs
mailing list