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.12.4~15 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=548ce42ccb004f7b243d37a17bca3a08dd69a346;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: I787307d4291babfb9ddcb12937efdbfbb5fd7009 --- diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index 1dce981b6..c304a37db 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -2053,7 +2053,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; } /*