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>
Wed, 29 Jul 2020 17:03:31 +0000 (13:03 -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 93df59ccdc97d8fe26578866a96ff48229015110..31eb2b43025f6d0207ed3e840c634dabc25b405a 100644 (file)
@@ -823,8 +823,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.027509 seconds and 4 git commands to generate.