Fix: sessiond: don't negate error code on list error
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 15 Jun 2020 22:43:02 +0000 (18:43 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 27 Jul 2020 20:30:25 +0000 (16:30 -0400)
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 <jeremie.galarneau@efficios.com>
Change-Id: I6df6fa14e4e443798dfdc1aa7a8fd7cfe380835b

src/bin/lttng-sessiond/cmd.c

index 8c1776072c35d1aae2206007c70bd193a60cd89e..0036397c3b8492ffecd51921112132479fa4caf9 100644 (file)
@@ -819,8 +819,7 @@ end:
        return nb_event;
 
 error:
-       /* Negate the error code to differentiate the size from an error */
-       return -ret;
+       return ret;
 }
 
 /*
This page took 0.026918 seconds and 4 git commands to generate.