Remove superflous domain check in add_uctx_to_channel
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 26 Jan 2016 16:45:42 +0000 (11:45 -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 be15cebd20babb346618f1d23b2fbe3eb21f9671..941ab2535a0476d062b6de45820c430738f7f850 100644 (file)
@@ -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;
        }
 
This page took 0.026146 seconds and 4 git commands to generate.