bulkstat_unlink_test_modified: Remove extraneous if statement
authorRostislav Skudnov <rostislav@tuxera.com>
Fri, 6 Oct 2017 08:25:19 +0000 (08:25 +0000)
committerEryu Guan <eguan@redhat.com>
Sun, 8 Oct 2017 11:34:42 +0000 (19:34 +0800)
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 <rostislav@tuxera.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <eguan@redhat.com>
src/bulkstat_unlink_test_modified.c

index 660499261aea5da875fa9a9e1bc9534a8996381c..981d80cce03c0a702aeff0498eecdffa0677de8c 100644 (file)
@@ -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);
                    }
                }
            }