From: David Goulet Date: Mon, 12 Dec 2011 20:58:34 +0000 (-0500) Subject: Fix code syntax X-Git-Tag: v2.0-pre15~4 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b9ef1c833d0a0dbb457ca920a15c0f54f3585374;p=lttng-tools.git Fix code syntax Signed-off-by: David Goulet --- diff --git a/lttng-sessiond/main.c b/lttng-sessiond/main.c index 54859c8dc..27d4c04de 100644 --- a/lttng-sessiond/main.c +++ b/lttng-sessiond/main.c @@ -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 */