From: Jérémie Galarneau Date: Wed, 26 Aug 2015 16:00:05 +0000 (-0400) Subject: Fix: cmd_enable_event must return positive error codes X-Git-Tag: v2.8.0-rc1~463 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e5b3c48c4d0597df5f23c3ee9b77e226dc90060c;p=lttng-tools.git Fix: cmd_enable_event must return positive error codes Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 532106c1a..01969b2b9 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -1729,7 +1729,7 @@ static int _cmd_enable_event(struct ltt_session *session, if (!agt) { agt = agent_create(domain->type); if (!agt) { - ret = -LTTNG_ERR_NOMEM; + ret = LTTNG_ERR_NOMEM; goto error; } agent_add(agt, usess->agents); @@ -1741,7 +1741,7 @@ static int _cmd_enable_event(struct ltt_session *session, 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));