1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-10-08 19:33:19 +03:00

tidy: prefer not using else after return

clang-tidy: avoid using  'else' after return - give more readable code,
and also saves indention level.
This commit is contained in:
Zdenek Kabelac
2017-07-19 16:16:12 +02:00
parent 0d0a3397c2
commit 0bf836aa14
32 changed files with 318 additions and 244 deletions

View File

@@ -320,8 +320,8 @@ static int _compare_paths(const char *path0, const char *path1)
/* ASCII comparison */
if (strcmp(path0, path1) < 0)
return 0;
else
return 1;
return 1;
}
static int _add_alias(struct device *dev, const char *path)
@@ -898,10 +898,10 @@ int dev_cache_index_devs(void)
if (errno == ENOENT) {
sysfs_has_dev_block = 0;
return 1;
} else {
log_sys_error("stat", path);
return 0;
}
log_sys_error("stat", path);
return 0;
}
} else if (!sysfs_has_dev_block)
return 1;