(check_hardlinks): suspicious condition (assignment + comparison).

Clarify expression with parentheses.

Found by cppcheck 1.81.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andreas Mohr 2019-01-08 06:39:09 +00:00 committed by Andrew Borodin
parent 04e26ca78b
commit 371d69e8ba

View File

@ -383,7 +383,7 @@ check_hardlinks (const vfs_path_t * src_vpath, const struct stat *src_stat,
{
gboolean ok;
while (!(ok = mc_stat (lnk->dst_vpath, &link_stat) == 0) && !*skip_all)
while (!(ok = (mc_stat (lnk->dst_vpath, &link_stat) == 0)) && !*skip_all)
{
FileProgressStatus status;
@ -403,7 +403,7 @@ check_hardlinks (const vfs_path_t * src_vpath, const struct stat *src_stat,
if (!ok)
return HARDLINK_ERROR;
while (!(ok = mc_link (lnk->dst_vpath, dst_vpath) == 0) && !*skip_all)
while (!(ok = (mc_link (lnk->dst_vpath, dst_vpath) == 0)) && !*skip_all)
{
FileProgressStatus status;