summaryrefslogtreecommitdiff
path: root/Detail.c
diff options
context:
space:
mode:
authorJes Sorensen <jsorensen@fb.com>2017-04-12 17:05:55 -0400
committerJes Sorensen <jsorensen@fb.com>2017-04-12 17:05:55 -0400
commit776b199e41d10e344efc47008366ca46715c5acc (patch)
tree33491ba0d4b77884fc2c1c618e455be1b368af79 /Detail.c
parent0ef1043ce8dd3f36c7227aa4a260819c4c17c78d (diff)
downloadmdadm-776b199e41d10e344efc47008366ca46715c5acc.tar.gz
Detail: Fixup ugly if () foo() abuse
Cosmetic change only Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'Detail.c')
-rw-r--r--Detail.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Detail.c b/Detail.c
index 8f74832..e40cd8f 100644
--- a/Detail.c
+++ b/Detail.c
@@ -141,13 +141,15 @@ int Detail(char *dev, struct context *c)
}
/* try to load a superblock. Try sra->devs first, then try ioctl */
- if (st && !info) for (d = 0, subdev = sra ? sra->devs : NULL;
- d < max_disks || subdev;
- subdev ? (void)(subdev = subdev->next) : (void)(d++)){
+ if (st && !info)
+ for (d = 0, subdev = sra ? sra->devs : NULL;
+ d < max_disks || subdev;
+ subdev ? (void)(subdev = subdev->next) : (void)(d++)){
mdu_disk_info_t disk;
char *dv;
int fd2;
int err;
+
if (subdev)
disk = subdev->disk;
else {