X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Fclear.cpp;h=b7a312be583e6750df64d2872f379c4fce4cfd52;hp=4b5974612d14b9b5e284c535f3fcd486bf7cdd40;hb=HEAD;hpb=28ab034a2c3582d07d3423d2d746731f87d3969f diff --git a/src/lib/lttng-ctl/clear.cpp b/src/lib/lttng-ctl/clear.cpp index 4b5974612..61b2e5041 100644 --- a/src/lib/lttng-ctl/clear.cpp +++ b/src/lib/lttng-ctl/clear.cpp @@ -87,7 +87,7 @@ end: return handle; error: lttng_clear_handle_destroy(handle); - return NULL; + return nullptr; } static int handle_state_transition(struct lttng_clear_handle *handle) @@ -270,7 +270,7 @@ enum lttng_error_code lttng_clear_session(const char *session_name, struct lttng_clear_handle **_handle) { enum lttng_error_code ret_code = LTTNG_OK; - struct lttng_clear_handle *handle = NULL; + struct lttng_clear_handle *handle = nullptr; struct lttcomm_session_msg lsm = { .cmd_type = LTTCOMM_SESSIOND_COMMAND_CLEAR_SESSION, .session = {}, @@ -282,7 +282,7 @@ enum lttng_error_code lttng_clear_session(const char *session_name, ssize_t comm_ret; int ret; - if (session_name == NULL) { + if (session_name == nullptr) { ret_code = LTTNG_ERR_INVALID; goto error; } @@ -314,7 +314,7 @@ error: /* Transfer the handle to the caller. */ if (_handle) { *_handle = handle; - handle = NULL; + handle = nullptr; } if (sessiond_socket >= 0) { ret = close(sessiond_socket);