]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
sysfs: Avoid if and return on the same line
authorJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 11 Aug 2016 19:52:48 +0000 (15:52 -0400)
committerJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 11 Aug 2016 19:52:48 +0000 (15:52 -0400)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
sysfs.c

diff --git a/sysfs.c b/sysfs.c
index 8379ca83075dfec584c4408b35ad3f3a68d68521..d28e21a251eba7851a27c6ba96a97f9795e10259 100644 (file)
--- a/sysfs.c
+++ b/sysfs.c
@@ -394,7 +394,8 @@ unsigned long long get_component_size(int fd)
        struct stat stb;
        char fname[50];
        int n;
-       if (fstat(fd, &stb)) return 0;
+       if (fstat(fd, &stb))
+               return 0;
        if (major(stb.st_rdev) != (unsigned)get_mdp_major())
                sprintf(fname, "/sys/block/md%d/md/component_size",
                        (int)minor(stb.st_rdev));