From: Jérémie Galarneau Date: Fri, 25 Mar 2022 19:34:47 +0000 (-0400) Subject: Fix: sessiond: cmd_enable_channel: negative error code used X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=159a54f4a1c884e465c40ffc7ac02fd64c294bf8;p=lttng-tools.git Fix: sessiond: cmd_enable_channel: negative error code used 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 Change-Id: I340f739cc33858a06832bb75a7a6d5e18459551f --- diff --git a/src/bin/lttng-sessiond/cmd.cpp b/src/bin/lttng-sessiond/cmd.cpp index ff7c03947..4892e3539 100644 --- a/src/bin/lttng-sessiond/cmd.cpp +++ b/src/bin/lttng-sessiond/cmd.cpp @@ -1290,7 +1290,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; }