Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
assert(usess);
assert(uchan);
assert(ctx);
+ assert(domain == LTTNG_DOMAIN_UST);
/* Check if context is duplicate */
cds_list_for_each_entry(uctx, &uchan->ctx_list, list) {
goto error;
}
- switch (domain) {
- case LTTNG_DOMAIN_UST:
- ret = ust_app_add_ctx_channel_glb(usess, uchan, uctx);
- if (ret < 0) {
- goto error;
- }
- break;
- default:
- ret = -ENOSYS;
+ ret = ust_app_add_ctx_channel_glb(usess, uchan, uctx);
+ if (ret < 0) {
goto error;
}