From: Christophe Bedard Date: Fri, 28 Aug 2020 15:00:30 +0000 (-0400) Subject: Fix: lttng_destroy_session_no_wait: return 0 on success X-Git-Tag: v2.13.0-rc1~106 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3204017e17704001c83085d94c2a8fc72e1aad16;p=lttng-tools.git Fix: lttng_destroy_session_no_wait: return 0 on success lttng_destroy_session_no_wait() is supposed to behave like lttng_destroy_session(): > Return 0 on success else a negative LTTNg error code. However, it returns LTTNG_OK on success. Make it return 0 instead. Signed-off-by: Christophe Bedard Signed-off-by: Jérémie Galarneau Change-Id: If51f6a2cc3ca77237f7cbac806c5206a807dadf5 --- diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index 29ebe9c9e..52b5263d8 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -2070,7 +2070,7 @@ int lttng_destroy_session_no_wait(const char *session_name) enum lttng_error_code ret_code; ret_code = lttng_destroy_session_ext(session_name, NULL); - return ret_code == LTTNG_OK ? ret_code : -ret_code; + return ret_code == LTTNG_OK ? 0 : -ret_code; } /*