From 2198c1e1b48c9c98f17cce24adde8408b5cd1c64 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 26 Aug 2015 12:00:05 -0400 Subject: [PATCH] Fix: cmd_enable_event must return positive error codes MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 2d49aae2d..ff7d99326 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -1575,7 +1575,7 @@ int cmd_enable_event(struct ltt_session *session, struct lttng_domain *domain, if (!agt) { agt = agent_create(domain->type); if (!agt) { - ret = -LTTNG_ERR_NOMEM; + ret = LTTNG_ERR_NOMEM; goto error; } agent_add(agt, usess->agents); @@ -1587,7 +1587,7 @@ int cmd_enable_event(struct ltt_session *session, struct lttng_domain *domain, uevent.loglevel_type = LTTNG_EVENT_LOGLEVEL_ALL; default_event_name = event_get_default_agent_ust_name(domain->type); if (!default_event_name) { - ret = -LTTNG_ERR_FATAL; + ret = LTTNG_ERR_FATAL; goto error; } strncpy(uevent.name, default_event_name, sizeof(uevent.name)); -- 2.34.1