The code was a bit ugly in that it didn't set error_r on ENOENT. There was
no bug because the caller did check for this, but scan-build didn't
understand it.
the same or if this is a hash collision */
fd1 = open(path1, O_RDONLY);
if (fd1 == -1) {
- if (errno != ENOENT)
- *error_r = t_strdup_printf("open(%s) failed: %m", path1);
+ *error_r = t_strdup_printf("open(%s) failed: %m", path1);
return -1;
}
fd2 = open(path2, O_RDONLY);
if (fd2 == -1) {
- if (errno != ENOENT)
- *error_r = t_strdup_printf("open(%s) failed: %m", path2);
+ *error_r = t_strdup_printf("open(%s) failed: %m", path2);
i_close_fd(&fd1);
return -1;
}