From 371d69e8ba7ce34d43151a35ed3b668c9aded3a7 Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Tue, 8 Jan 2019 06:39:09 +0000 Subject: [PATCH] (check_hardlinks): suspicious condition (assignment + comparison). Clarify expression with parentheses. Found by cppcheck 1.81. Signed-off-by: Andreas Mohr Signed-off-by: Andrew Borodin --- src/filemanager/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/filemanager/file.c b/src/filemanager/file.c index 367196523..d0afee1b4 100644 --- a/src/filemanager/file.c +++ b/src/filemanager/file.c @@ -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;