Actions
Bug #48866
closedThe interface code about group list is redundant
Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:
0%
Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Description
At librbd::api::group::list,the code is redundant,like:
if (r == -ENOENT) {
return 0; // Ignore missing rbd group directory. It means we don't have any groups yet.
}
if (r < 0) {
if (r != -ENOENT) {
lderr(cct) << "error listing group in directory: "
<< cpp_strerror(r) << dendl;
} else {
r = 0;
}
return r;
}
I think the first if judgment can be removed.
Actions