From c4ccc3498eff1f2bfaf184aa1fd6cfc8ed98f74c Mon Sep 17 00:00:00 2001 From: Rostislav Skudnov Date: Fri, 6 Oct 2017 08:25:19 +0000 Subject: [PATCH] bulkstat_unlink_test_modified: Remove extraneous if statement Fixes the following compiler warning: bulkstat_unlink_test_modified.c:171:26: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((ret[i].bs_ino == inodelist[j])) { ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ Signed-off-by: Rostislav Skudnov Reviewed-by: Christoph Hellwig Signed-off-by: Eryu Guan --- src/bulkstat_unlink_test_modified.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/bulkstat_unlink_test_modified.c b/src/bulkstat_unlink_test_modified.c index 660499261..981d80cce 100644 --- a/src/bulkstat_unlink_test_modified.c +++ b/src/bulkstat_unlink_test_modified.c @@ -168,13 +168,12 @@ main(int argc, char *argv[]) genlist[j]); exit(1); } - if ((ret[i].bs_ino == inodelist[j])) { - if ((genlist[j] + 1) != ret[i].bs_gen) { - /* oops, the new gen number is not 1 bigger than the old */ - printf("Inode with old generation %d, new generation %d\n", - genlist[j], ret[i].bs_gen); - exit(1); - } + if (ret[i].bs_ino == inodelist[j] && + ret[i].bs_gen != genlist[j] + 1) { + /* oops, the new gen number is not 1 bigger than the old */ + printf("Inode with old generation %d, new generation %d\n", + genlist[j], ret[i].bs_gen); + exit(1); } } } -- 2.51.0