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.12.2~8 X-Git-Url: https://git.liburcu.org/?p=lttng-tools.git;a=commitdiff_plain;h=51da42aabd9ee62579448a5f68ba2cc00189c482 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 8f2afc326..3e3169f7b 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -816,8 +816,7 @@ end: return nb_event; error: - /* Negate the error code to differentiate the size from an error */ - return -ret; + return ret; } /*