struct signal_group_desc *desc;
desc = g_malloc0(sizeof(*desc));
- if (!desc)
- return NULL;
- if (name) {
+ if (name)
desc->name = g_strdup(name);
- if (!desc->name) {
- g_free(desc);
- return NULL;
- }
- }
return desc;
}
struct sr_channel_group *cg;
cg = g_malloc0(sizeof(*cg));
- if (!cg)
- return NULL;
- if (name && *name) {
+ if (name && *name)
cg->name = g_strdup(name);
- if (!cg->name) {
- g_free(cg);
- return NULL;
- }
- }
cg->priv = priv;
return cg;
(void)options;
in->sdi = g_malloc0(sizeof(*in->sdi));
-
inc = g_malloc0(sizeof(*inc));
- if (!inc)
- return SR_ERR_MALLOC;
in->priv = inc;
return SR_OK;