Remove superflous domain check in context_ust_add
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 26 Jan 2016 16:46:17 +0000 (11:46 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 12 Feb 2016 22:54:03 +0000 (17:54 -0500)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/context.c

index 941ab2535a0476d062b6de45820c430738f7f850..ffd6e3ad50f3d3702da54903c6b7afc703360494 100644 (file)
@@ -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') {
This page took 0.042225 seconds and 4 git commands to generate.