Fix two similar cases by declaring a variable in a narrower scope.
Change-Id: I6e36f4cf07086ccb5e58a175aff04671cc64323d
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
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;
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;
lttng_destruction_handle_wait_for_completion(
struct lttng_destruction_handle *handle, int timeout_ms)
{
- int ret;
enum lttng_destruction_handle_status status;
unsigned long time_left_ms = 0;
const bool has_timeout = timeout_ms > 0;
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_DESTRUCTION_HANDLE_STATUS_ERROR;
goto end;