summaryrefslogtreecommitdiffstats
path: root/sysfs.c
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2016-08-11 21:52:48 +0200
committerJes Sorensen <Jes.Sorensen@redhat.com>2016-08-11 21:52:48 +0200
commit36138e4e4b6c3f9db21e65ac8962bf22d4b2c274 (patch)
tree55090d720ae43e78887959b4a5f43378790ce958 /sysfs.c
parentsuper1: Avoid if and return on the same line (diff)
downloadmdadm-36138e4e4b6c3f9db21e65ac8962bf22d4b2c274.tar.xz
mdadm-36138e4e4b6c3f9db21e65ac8962bf22d4b2c274.zip
sysfs: Avoid if and return on the same line
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Diffstat (limited to 'sysfs.c')
-rw-r--r--sysfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysfs.c b/sysfs.c
index 8379ca83..d28e21a2 100644
--- 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));