]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdadm: Fixup != broken formatting
authorJes Sorensen <jsorensen@fb.com>
Tue, 16 May 2017 18:09:57 +0000 (14:09 -0400)
committerJes Sorensen <jsorensen@fb.com>
Tue, 16 May 2017 18:09:57 +0000 (14:09 -0400)
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Assemble.c
Grow.c
policy.c
restripe.c
super-ddf.c
super0.c

index afc6d9ca100e57dcd49a29af363da97517133e28..3c10b6cd27c20074793a1f9b00af43e4771f78cc 100644 (file)
@@ -755,8 +755,8 @@ static int load_devices(struct devs *devices, char *devmap,
                        if (best[i] >=0 &&
                            devices[best[i]].i.events ==
                            devices[devcnt].i.events &&
-                           (devices[best[i]].i.disk.minor
-                            != devices[devcnt].i.disk.minor) &&
+                           (devices[best[i]].i.disk.minor !=
+                            devices[devcnt].i.disk.minor) &&
                            st->ss == &super0 &&
                            content->array.level != LEVEL_MULTIPATH) {
                                /* two different devices with identical superblock.
diff --git a/Grow.c b/Grow.c
index db3f18b6d2630f95ad9dd39b2590a6828d97706f..ecf5ca0c043ae9e7f0346d8fd79bcfb2b6f3eba3 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -1403,8 +1403,8 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
                        if (info->new_layout == UnSet) {
                                int copies = 1 + (info->delta_disks
                                                  / info->array.raid_disks);
-                               if (info->array.raid_disks * (copies-1)
-                                   != info->delta_disks)
+                               if (info->array.raid_disks * (copies-1) !=
+                                   info->delta_disks)
                                        return "Impossible number of devices for RAID0->RAID10";
                                info->new_layout = 0x100 + copies;
                        }
@@ -3067,8 +3067,8 @@ static int reshape_array(char *container, int fd, char *devname,
        if (restart &&
            (reshape.level != info->array.level ||
             reshape.before.layout != info->array.layout ||
-            reshape.before.data_disks + reshape.parity
-            != info->array.raid_disks - max(0, info->delta_disks))) {
+            reshape.before.data_disks + reshape.parity !=
+            info->array.raid_disks - max(0, info->delta_disks))) {
                pr_err("reshape info is not in native format - cannot continue.\n");
                goto release;
        }
@@ -4281,8 +4281,9 @@ static int grow_backup(struct mdinfo *sra,
                                                ((char*)&bsb.sb_csum2)-((char*)&bsb));
 
                rv = -1;
-               if ((unsigned long long)lseek64(destfd[i], destoffsets[i] - 4096, 0)
-                   != destoffsets[i] - 4096)
+               if ((unsigned long long)lseek64(destfd[i],
+                                               destoffsets[i] - 4096, 0) !=
+                   destoffsets[i] - 4096)
                        break;
                if (write(destfd[i], &bsb, 512) != 512)
                        break;
index 064d34919ea5a750ca4394d7aa3d019392e44549..b17585a9d7a67af45effac4313f591e78c9d7340 100644 (file)
--- a/policy.c
+++ b/policy.c
@@ -887,9 +887,8 @@ int Write_rules(char *rule_name)
                fd = 1;
 
        /* write static invocation */
-       if (write(fd, udev_template_start,
-                 sizeof(udev_template_start) - 1)
-           != (int)sizeof(udev_template_start)-1)
+       if (write(fd, udev_template_start, sizeof(udev_template_start) - 1) !=
+           (int)sizeof(udev_template_start) - 1)
                goto abort;
 
        /* iterate, if none created or error occurred, remove file */
index 6b31695b5a92451c4ec72dbd1092d06df349e96f..31b07e89f318191ec97c39bda899dedbd7d2fbf6 100644 (file)
@@ -581,14 +581,16 @@ int save_stripes(int *source, unsigned long long *offsets,
                                       raid_disks, level, layout);
                        if (dnum < 0) abort();
                        if (source[dnum] < 0 ||
-                           lseek64(source[dnum], offsets[dnum]+offset, 0) < 0 ||
-                           read(source[dnum], buf+disk * chunk_size, chunk_size)
-                           != chunk_size)
+                           lseek64(source[dnum],
+                                   offsets[dnum] + offset, 0) < 0 ||
+                           read(source[dnum], buf+disk * chunk_size,
+                                chunk_size) != chunk_size) {
                                if (failed <= 2) {
                                        fdisk[failed] = dnum;
                                        fblock[failed] = disk;
                                        failed++;
                                }
+                       }
                }
                if (failed == 0 || fblock[0] >= data_disks)
                        /* all data disks are good */
index c2336013a6c59c1b994e97156203a07b3e840979..d02a19a21010aae12cd4d76f5b1708e221e6664a 100644 (file)
@@ -3511,8 +3511,8 @@ static int validate_geometry_ddf_bvd(struct supertype *st,
                if (minsize == 0)
                        minsize = 8;
                for (dl = ddf->dlist; dl ; dl = dl->next) {
-                       if (find_space(ddf, dl, data_offset, &minsize)
-                           != INVALID_SECTORS)
+                       if (find_space(ddf, dl, data_offset, &minsize) !=
+                           INVALID_SECTORS)
                                dcnt++;
                }
                if (dcnt < raiddisks) {
@@ -4004,8 +4004,8 @@ static int compare_super_ddf(struct supertype *st, struct supertype *tst)
                        continue;
 
                if (posix_memalign((void **)&dl1, 512,
-                      sizeof(*dl1) + (first->max_part) * sizeof(dl1->vlist[0]))
-                   != 0) {
+                                  sizeof(*dl1) + (first->max_part) *
+                                  sizeof(dl1->vlist[0])) != 0) {
                        pr_err("could not allocate disk info buffer\n");
                        return 3;
                }
index dc13efb639e79c38a35bf906e3b659125aac445c..756cab5e9d009347090677dce6b72bad1ce7ece0 100644 (file)
--- a/super0.c
+++ b/super0.c
@@ -589,8 +589,8 @@ static int update_super0(struct supertype *st, struct mdinfo *info,
                         * being marked 'sync'
                         */
                        add = (1<<MD_DISK_SYNC);
-               if (((sb->disks[d].state & ~mask) | add)
-                   != (unsigned)info->disk.state) {
+               if (((sb->disks[d].state & ~mask) | add) !=
+                   (unsigned)info->disk.state) {
                        sb->disks[d].state = info->disk.state | wonly |failfast;
                        rv = 1;
                }
@@ -1058,8 +1058,8 @@ static int load_super0(struct supertype *st, int fd, char *devname)
         * valid.  If it doesn't clear the bit.  An --assemble --force
         * should get that written out.
         */
-       if (read(fd, super+1, ROUND_UP(sizeof(struct bitmap_super_s),4096))
-           != ROUND_UP(sizeof(struct bitmap_super_s),4096))
+       if (read(fd, super+1, ROUND_UP(sizeof(struct bitmap_super_s),4096)) !=
+           ROUND_UP(sizeof(struct bitmap_super_s), 4096))
                goto no_bitmap;
 
        uuid_from_super0(st, uuid);