diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index f9a3981aa46..e06dafca4ec 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -2051,10 +2051,8 @@ void OSDMap::pg_to_raw_osds(pg_t pg, vector *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); @@ -2065,10 +2063,8 @@ void OSDMap::pg_to_raw_up(pg_t pg, vector *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 raw;