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.11.7~11 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c878274a9c59ccaeab58e6e21ee30191432faabb;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 ad4974a13..b28656ee1 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -2128,7 +2128,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; } /*