Fix code syntax
[lttng-tools.git] / lttng-sessiond / main.c
index 54859c8dc302883eccb9dc3c53563ab4eda7f89c..27d4c04de9314d08dbdd530752b7dd457c1c684b 100644 (file)
@@ -2772,8 +2772,11 @@ static int cmd_start_trace(struct ltt_session *session)
        ksession = session->kernel_session;
        usess = session->ust_session;
 
-       if (session->enabled)
-               return LTTCOMM_UST_START_FAIL;
+       if (session->enabled) {
+               ret = LTTCOMM_UST_START_FAIL;
+               goto error;
+       }
+
        session->enabled = 1;
 
        /* Kernel tracing */
@@ -2861,8 +2864,11 @@ static int cmd_stop_trace(struct ltt_session *session)
        ksession = session->kernel_session;
        usess = session->ust_session;
 
-       if (!session->enabled)
-               return LTTCOMM_UST_START_FAIL;
+       if (!session->enabled) {
+               ret = LTTCOMM_UST_START_FAIL;
+               goto error;
+       }
+
        session->enabled = 0;
 
        /* Kernel tracer */
This page took 0.023021 seconds and 4 git commands to generate.