[PATCH v2] bulkstat_unlink_test_modified: Remove extraneous if statement

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



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])) {
                         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
---
Updated according to your suggestion, removed extra parentheses.

 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 6604992..981d80c 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.1.4

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux