sysfs: Avoid if and return on the same line

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
This commit is contained in:
Jes Sorensen 2016-08-11 15:52:48 -04:00
parent 7eef9be219
commit 36138e4e4b
1 changed files with 2 additions and 1 deletions

View File

@ -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));