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:
@ -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) {
|
||||
|
Reference in New Issue
Block a user