10.05.2021 18:33, Alberto Garcia wrote:
On Tue 04 May 2021 11:45:09 AM CEST, Vladimir Sementsov-Ogievskiy
<vsement...@virtuozzo.com> wrote:
All existing parent types (block nodes, block devices, jobs) has the
realization. So, drop unreachable code.
s/has/have/ , and I'm not sure what "have the realization" means
static char *bdrv_child_user_desc(BdrvChild *c)
{
- if (c->klass->get_parent_desc) {
- return c->klass->get_parent_desc(c);
- }
-
- return g_strdup("another user");
+ return c->klass->get_parent_desc(c);
}
Should we also assert(c->klass->get_parent_desc) ?
No, as crash on calling zero pointer is practically not worse than crash on
failed assertion.
--
Best regards,
Vladimir