]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Grow.c
mdadm: Fixup more broken logical operator formatting
[thirdparty/mdadm.git] / Grow.c
diff --git a/Grow.c b/Grow.c
index 39110b852e7c8979eb45023df072ae536f5a5221..db3f18b6d2630f95ad9dd39b2590a6828d97706f 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -3995,8 +3995,8 @@ int progress_reshape(struct mdinfo *info, struct reshape *reshape,
         * a backup.
         */
        if (advancing) {
-               if ((need_backup > info->reshape_progress
-                    || info->array.major_version < 0) &&
+               if ((need_backup > info->reshape_progress ||
+                    info->array.major_version < 0) &&
                    *suspend_point < info->reshape_progress + target) {
                        if (need_backup < *suspend_point + 2 * target)
                                *suspend_point = need_backup;
@@ -4149,8 +4149,9 @@ check_progress:
         * it was just a device failure that leaves us degraded but
         * functioning.
         */
-       if (sysfs_get_str(info, NULL, "reshape_position", buf, sizeof(buf)) < 0
-           || strncmp(buf, "none", 4) != 0) {
+       if (sysfs_get_str(info, NULL, "reshape_position", buf,
+                         sizeof(buf)) < 0 ||
+           strncmp(buf, "none", 4) != 0) {
                /* The abort might only be temporary.  Wait up to 10
                 * seconds for fd to contain a valid number again.
                 */
@@ -4182,9 +4183,10 @@ check_progress:
                /* Maybe racing with array shutdown - check state */
                if (fd >= 0)
                        close(fd);
-               if (sysfs_get_str(info, NULL, "array_state", buf, sizeof(buf)) < 0
-                   || strncmp(buf, "inactive", 8) == 0
-                   || strncmp(buf, "clear",5) == 0)
+               if (sysfs_get_str(info, NULL, "array_state", buf,
+                                 sizeof(buf)) < 0 ||
+                   strncmp(buf, "inactive", 8) == 0 ||
+                   strncmp(buf, "clear",5) == 0)
                        return -2; /* abort */
                return -1; /* complete */
        }