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.11.5~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=72d6ec2febbc7381fbb92f902ee595e967a57b36;p=lttng-tools.git 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 93df59ccd..31eb2b430 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -823,8 +823,7 @@ end: return nb_event; error: - /* Negate the error code to differentiate the size from an error */ - return -ret; + return ret; } /*