From 6314496ffcf94c0ccf2fea63a215e0a84a5ee463 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 15 Jun 2020 18:43:02 -0400 Subject: [PATCH] Fix: sessiond: don't negate error code on list error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/bin/lttng-sessiond/cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; } /* -- 2.34.1