From: Jérémie Galarneau Date: Tue, 26 Jan 2016 16:45:42 +0000 (-0500) Subject: Remove superflous domain check in add_uctx_to_channel X-Git-Tag: v2.8.0-rc1~180 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c0c66aecd959ec1bfb895abdd8442e2faf1159a6;p=lttng-tools.git Remove superflous domain check in add_uctx_to_channel Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/context.c b/src/bin/lttng-sessiond/context.c index be15cebd2..941ab2535 100644 --- a/src/bin/lttng-sessiond/context.c +++ b/src/bin/lttng-sessiond/context.c @@ -97,6 +97,7 @@ static int add_uctx_to_channel(struct ltt_ust_session *usess, 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) { @@ -113,15 +114,8 @@ static int add_uctx_to_channel(struct ltt_ust_session *usess, 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; }