From: Jérémie Galarneau Date: Mon, 15 Jun 2020 22:43:02 +0000 (-0400) Subject: Fix: sessiond: don't negate error code on list error X-Git-Tag: v2.13.0-rc1~576 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=6314496ffcf94c0ccf2fea63a215e0a84a5ee463;ds=sidebyside Fix: sessiond: don't negate error code on list error Listing errors are already negative. Negating in the error path causes error codes to be interpreted as a number of events and cause a communication error further on. Signed-off-by: Jérémie Galarneau Change-Id: I6df6fa14e4e443798dfdc1aa7a8fd7cfe380835b --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 8c1776072..0036397c3 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -819,8 +819,7 @@ end: return nb_event; error: - /* Negate the error code to differentiate the size from an error */ - return -ret; + return ret; } /*