info->location.relay.relative_path);
break;
default:
- location = NULL;
+ location = nullptr;
break;
}
return location;
enum lttng_rotation_state *state)
{
enum lttng_rotation_status status = LTTNG_ROTATION_STATUS_OK;
- struct lttng_rotation_get_info_return *info = NULL;
+ struct lttng_rotation_get_info_return *info = nullptr;
if (!rotation_handle || !state) {
status = LTTNG_ROTATION_STATUS_INVALID;
const struct lttng_trace_archive_location **location)
{
enum lttng_rotation_status status = LTTNG_ROTATION_STATUS_OK;
- struct lttng_rotation_get_info_return *info = NULL;
+ struct lttng_rotation_get_info_return *info = nullptr;
if (!rotation_handle || !location) {
status = LTTNG_ROTATION_STATUS_INVALID;
struct lttng_rotation_handle **rotation_handle)
{
struct lttcomm_session_msg lsm;
- struct lttng_rotate_session_return *rotate_return = NULL;
+ struct lttng_rotate_session_return *rotate_return = nullptr;
int ret;
size_t session_name_len;
ret = lttng_ctl_ask_sessiond(&lsm, (void **) &rotate_return);
if (ret <= 0) {
- *rotation_handle = NULL;
+ *rotation_handle = nullptr;
goto end;
}
goto end;
}
- ret = lttng_ctl_ask_sessiond(&lsm, NULL);
+ ret = lttng_ctl_ask_sessiond(&lsm, nullptr);
if (ret >= 0) {
goto end;
}
return status;
}
-static struct lttng_rotation_schedules *lttng_rotation_schedules_create(void)
+static struct lttng_rotation_schedules *lttng_rotation_schedules_create()
{
return zmalloc<lttng_rotation_schedules>();
}
{
int ret;
struct lttcomm_session_msg lsm;
- struct lttng_session_list_schedules_return *schedules_comm = NULL;
- struct lttng_rotation_schedules *schedules = NULL;
- struct lttng_rotation_schedule *periodic = NULL, *size = NULL;
+ struct lttng_session_list_schedules_return *schedules_comm = nullptr;
+ struct lttng_rotation_schedules *schedules = nullptr;
+ struct lttng_rotation_schedule *periodic = nullptr, *size = nullptr;
if (!session_name) {
ret = -LTTNG_ERR_INVALID;
}
lttng_schedules_add(schedules, periodic);
- periodic = NULL;
+ periodic = nullptr;
}
if (schedules_comm->size.set == 1) {
}
lttng_schedules_add(schedules, size);
- size = NULL;
+ size = nullptr;
}
ret = LTTNG_OK;
lttng_rotation_schedules_get_at_index(const struct lttng_rotation_schedules *schedules,
unsigned int index)
{
- const struct lttng_rotation_schedule *schedule = NULL;
+ const struct lttng_rotation_schedule *schedule = nullptr;
if (!schedules || index >= schedules->count) {
goto end;