Fix: cmd_enable_event must return positive error codes
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 26 Aug 2015 16:00:05 +0000 (12:00 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 23 Sep 2015 19:25:30 +0000 (15:25 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/cmd.c

index 2d49aae2da892e1c41a47472145590c9d622fc00..ff7d993265082439672a12ffed175809b942e9cd 100644 (file)
@@ -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));
This page took 0.028034 seconds and 4 git commands to generate.