X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Fclear.c;h=3face64de83ed1f0f1902cacbc5f2a4991d0a8cb;hb=a0377dfefe40662ba7d68617bce6ff467114136c;hp=9beec7240fbc744c7d17b56e2a5b07e8fef098bd;hpb=e429da85b5511f5a7d88d9858ed523bf35b4301c;p=lttng-tools.git diff --git a/src/lib/lttng-ctl/clear.c b/src/lib/lttng-ctl/clear.c index 9beec7240..3face64de 100644 --- a/src/lib/lttng-ctl/clear.c +++ b/src/lib/lttng-ctl/clear.c @@ -7,7 +7,6 @@ */ #define _LGPL_SOURCE -#include #include #include @@ -97,7 +96,7 @@ int handle_state_transition(struct lttng_clear_handle *handle) { int ret = 0; - assert(handle->communication.bytes_left_to_receive == 0); + LTTNG_ASSERT(handle->communication.bytes_left_to_receive == 0); switch (handle->communication.state) { case COMMUNICATION_STATE_RECEIVE_LTTNG_MSG: @@ -121,7 +120,7 @@ int handle_state_transition(struct lttng_clear_handle *handle) LTTNG_OPTIONAL_SET(&handle->communication.data_size, 0); ret = lttng_dynamic_buffer_set_size( &handle->communication.buffer, 0); - assert(!ret); + LTTNG_ASSERT(!ret); break; } default: @@ -173,7 +172,6 @@ extern enum lttng_clear_handle_status lttng_clear_handle_wait_for_completion( struct lttng_clear_handle *handle, int timeout_ms) { - int ret; enum lttng_clear_handle_status status; unsigned long time_left_ms = 0; const bool has_timeout = timeout_ms > 0; @@ -187,7 +185,7 @@ extern enum lttng_clear_handle_status goto end; } if (has_timeout) { - ret = lttng_clock_gettime(CLOCK_MONOTONIC, &initial_time); + int ret = lttng_clock_gettime(CLOCK_MONOTONIC, &initial_time); if (ret) { status = LTTNG_CLEAR_HANDLE_STATUS_ERROR; goto end;