From: Jes Sorensen Date: Wed, 12 Apr 2017 21:05:55 +0000 (-0400) Subject: Detail: Fixup ugly if () foo() abuse X-Git-Tag: mdadm-4.1-rc1~187 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=776b199e41d10e344efc47008366ca46715c5acc;p=thirdparty%2Fmdadm.git Detail: Fixup ugly if () foo() abuse Cosmetic change only Signed-off-by: Jes Sorensen --- diff --git a/Detail.c b/Detail.c index 8f74832a..e40cd8fc 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 {