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-Tag: v2.12.11~2 X-Git-Url: https://git.liburcu.org/?p=lttng-tools.git;a=commitdiff_plain;h=6ede7c4837890c6bb59a92d4fe987c12e2d3b30f 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.c b/src/bin/lttng-sessiond/cmd.c index 6f3dd7177..829e59dd4 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -1305,7 +1305,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; }