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.13.7~10 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=1fdabf20a7bf1cbed0fbe2c97baec36a96428c2d 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 361ef6dc8..87676b0e7 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -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; }