Fix: sessiond: cmd_enable_channel: negative error code used
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 25 Mar 2022 19:34:47 +0000 (15:34 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 6 Apr 2022 19:07:51 +0000 (15:07 -0400)
A negative `lttng_error_code` value is returned (as an integer)
when a channel copy fails. Return a positive error code.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I340f739cc33858a06832bb75a7a6d5e18459551f

src/bin/lttng-sessiond/cmd.c

index 361ef6dc8206d79b8b810e7143b52c3faea9008a..87676b0e79dd6a00194dfde2ccbe5d9e6ec48139 100644 (file)
@@ -1292,7 +1292,7 @@ static int cmd_enable_channel_internal(struct ltt_session *session,
 
        attr = lttng_channel_copy(_attr);
        if (!attr) {
-               ret = -LTTNG_ERR_NOMEM;
+               ret = LTTNG_ERR_NOMEM;
                goto end;
        }
 
This page took 0.02826 seconds and 4 git commands to generate.