X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Fdestruction-handle.cpp;h=35a1c358225376de7c7a3fa5de1614a93e8c9312;hb=HEAD;hp=d77554a588fb58da04a2db7e066b3c95dedffff0;hpb=28ab034a2c3582d07d3423d2d746731f87d3969f;p=lttng-tools.git diff --git a/src/lib/lttng-ctl/destruction-handle.cpp b/src/lib/lttng-ctl/destruction-handle.cpp index d77554a58..e97364587 100644 --- a/src/lib/lttng-ctl/destruction-handle.cpp +++ b/src/lib/lttng-ctl/destruction-handle.cpp @@ -90,7 +90,7 @@ end: return handle; error: lttng_destruction_handle_destroy(handle); - return NULL; + return nullptr; } static int handle_state_transition(struct lttng_destruction_handle *handle) @@ -235,7 +235,7 @@ lttng_destruction_handle_wait_for_completion(struct lttng_destruction_handle *ha goto end; } if (has_timeout) { - int ret = lttng_clock_gettime(CLOCK_MONOTONIC, &initial_time); + const int ret = lttng_clock_gettime(CLOCK_MONOTONIC, &initial_time); if (ret) { status = LTTNG_DESTRUCTION_HANDLE_STATUS_ERROR; goto end; @@ -377,7 +377,7 @@ enum lttng_error_code lttng_destroy_session_ext(const char *session_name, .fd_count = 0, }; int sessiond_socket = -1; - struct lttng_destruction_handle *handle = NULL; + struct lttng_destruction_handle *handle = nullptr; if (!session_name) { ret_code = LTTNG_ERR_INVALID; @@ -414,7 +414,7 @@ enum lttng_error_code lttng_destroy_session_ext(const char *session_name, /* Transfer the handle to the caller. */ if (_handle) { *_handle = handle; - handle = NULL; + handle = nullptr; } error: if (sessiond_socket >= 0) {