1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-08-02 04:22:02 +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

@ -1137,13 +1137,12 @@ static int _rename_dev_node(const char *old_name, const char *new_name,
errno == ENOENT)
/* assume udev already deleted this */
return 1;
else {
log_warn("The node %s should have been renamed to %s "
"by udev but old node is still present. "
"Falling back to direct old node removal.",
oldpath, newpath);
return _rm_dev_node(old_name, 0);
}
log_warn("The node %s should have been renamed to %s "
"by udev but old node is still present. "
"Falling back to direct old node removal.",
oldpath, newpath);
return _rm_dev_node(old_name, 0);
}
if (unlink(newpath) < 0) {