Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd/OSDMap: remove the unnecessary checks for null #18636

Merged
merged 1 commit into from
Nov 1, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/osd/OSDMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2070,10 +2070,8 @@ void OSDMap::pg_to_raw_osds(pg_t pg, vector<int> *raw, int *primary) const
{
const pg_pool_t *pool = get_pg_pool(pg.pool());
if (!pool) {
if (primary)
*primary = -1;
if (raw)
raw->clear();
*primary = -1;
raw->clear();
return;
}
_pg_to_raw_osds(*pool, pg, raw, NULL);
Expand All @@ -2084,10 +2082,8 @@ void OSDMap::pg_to_raw_up(pg_t pg, vector<int> *up, int *primary) const
{
const pg_pool_t *pool = get_pg_pool(pg.pool());
if (!pool) {
if (primary)
*primary = -1;
if (up)
up->clear();
*primary = -1;
up->clear();
return;
}
vector<int> raw;
Expand Down