Mercurial > dovecot > core-2.2
changeset 12335:a6eb233ac3ba
Static analyzer warning fix.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 21 Oct 2010 19:03:39 +0100 |
parents | d9a66fa6e206 |
children | 8a838dcf8e76 |
files | src/doveadm/doveadm-sis.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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; }