From: Jérémie Galarneau Date: Tue, 26 Jan 2016 16:46:17 +0000 (-0500) Subject: Remove superflous domain check in context_ust_add X-Git-Tag: v2.8.0-rc1~179 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f5501dadeacee8f75aa9e5dca65adea504e976f7;p=lttng-tools.git Remove superflous domain check in context_ust_add Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/context.c b/src/bin/lttng-sessiond/context.c index 941ab2535..ffd6e3ad5 100644 --- a/src/bin/lttng-sessiond/context.c +++ b/src/bin/lttng-sessiond/context.c @@ -246,21 +246,11 @@ int context_ust_add(struct ltt_ust_session *usess, assert(usess); assert(ctx); assert(channel_name); + assert(domain == LTTNG_DOMAIN_UST); rcu_read_lock(); - /* - * Define which channel's hashtable to use from the domain or quit if - * unknown domain. - */ - switch (domain) { - case LTTNG_DOMAIN_UST: - chan_ht = usess->domain_global.channels; - break; - default: - ret = LTTNG_ERR_UND; - goto error; - } + chan_ht = usess->domain_global.channels; /* Get UST channel if defined */ if (channel_name[0] != '\0') {