"help",
'h',
POPT_ARG_NONE,
- 0,
+ nullptr,
OPT_HELP,
- 0,
- 0,
+ nullptr,
+ nullptr,
},
{
"session",
POPT_ARG_STRING,
&opt_session_name,
OPT_SESSION,
- 0,
- 0,
+ nullptr,
+ nullptr,
},
{
"kernel",
POPT_ARG_VAL,
&opt_kernel,
1,
- 0,
- 0,
+ nullptr,
+ nullptr,
},
{
"userspace",
POPT_ARG_VAL,
&opt_userspace,
1,
- 0,
- 0,
+ nullptr,
+ nullptr,
},
{
"pid",
POPT_ARG_STRING | POPT_ARGFLAG_OPTIONAL,
&opt_str_arg,
OPT_PID,
- 0,
- 0,
+ nullptr,
+ nullptr,
},
{
"vpid",
POPT_ARG_STRING | POPT_ARGFLAG_OPTIONAL,
&opt_str_arg,
OPT_VPID,
- 0,
- 0,
+ nullptr,
+ nullptr,
},
{
"uid",
POPT_ARG_STRING | POPT_ARGFLAG_OPTIONAL,
&opt_str_arg,
OPT_UID,
- 0,
- 0,
+ nullptr,
+ nullptr,
},
{
"vuid",
POPT_ARG_STRING | POPT_ARGFLAG_OPTIONAL,
&opt_str_arg,
OPT_VUID,
- 0,
- 0,
+ nullptr,
+ nullptr,
},
{
"gid",
POPT_ARG_STRING | POPT_ARGFLAG_OPTIONAL,
&opt_str_arg,
OPT_GID,
- 0,
- 0,
+ nullptr,
+ nullptr,
},
{
"vgid",
POPT_ARG_STRING | POPT_ARGFLAG_OPTIONAL,
&opt_str_arg,
OPT_VGID,
- 0,
- 0,
+ nullptr,
+ nullptr,
},
{
"all",
'a',
POPT_ARG_NONE,
- 0,
+ nullptr,
OPT_ALL,
- 0,
- 0,
+ nullptr,
+ nullptr,
},
{
"list-options",
0,
POPT_ARG_NONE,
- NULL,
+ nullptr,
OPT_LIST_OPTIONS,
- 0,
- 0,
+ nullptr,
+ nullptr,
},
{
+ nullptr,
0,
0,
+ nullptr,
0,
- 0,
- 0,
- 0,
- 0,
+ nullptr,
+ nullptr,
},
};
default:
return "Unknown";
}
- return NULL;
+ return nullptr;
}
static bool ust_process_attr_supported(enum lttng_process_attr *process_attr)
enum lttng_process_attr process_attr,
struct mi_writer *writer)
{
- struct lttng_process_attr_tracker_handle *tracker_handle = NULL;
+ struct lttng_process_attr_tracker_handle *tracker_handle = nullptr;
const enum lttng_error_code handle_ret_code = lttng_session_get_tracker_handle(
session_name, domain_type, process_attr, &tracker_handle);
enum cmd_error_code cmd_ret = CMD_SUCCESS;
const char *_args,
struct mi_writer *writer)
{
- struct lttng_process_attr_tracker_handle *tracker_handle = NULL;
+ struct lttng_process_attr_tracker_handle *tracker_handle = nullptr;
const enum lttng_error_code handle_ret_code = lttng_session_get_tracker_handle(
session_name, domain_type, process_attr, &tracker_handle);
enum cmd_error_code cmd_ret = CMD_SUCCESS;
goto end;
}
- while ((one_value_str = strtok_r(iter, ",", &iter)) != NULL) {
+ while ((one_value_str = strtok_r(iter, ",", &iter)) != nullptr) {
const bool is_numerical_argument = isdigit(one_value_str[0]);
enum lttng_process_attr_tracker_handle_status status;
enum lttng_tracking_policy policy;
}
if (is_numerical_argument) {
- const unsigned long one_value_int = strtoul(one_value_str, NULL, 10);
+ const unsigned long one_value_int = strtoul(one_value_str, nullptr, 10);
if (writer) {
ret = mi_lttng_integral_process_attribute_value(
sizeof(process_attr_commands) / sizeof(struct process_attr_command_args);
enum cmd_error_code command_ret = CMD_SUCCESS;
static poptContext pc;
- char *session_name = NULL;
- const char *leftover = NULL;
- struct mi_writer *writer = NULL;
+ char *session_name = nullptr;
+ const char *leftover = nullptr;
+ struct mi_writer *writer = nullptr;
size_t i;
for (i = 0; i < command_count; i++) {
goto end;
}
- pc = poptGetContext(NULL, argc, argv, long_options, 0);
+ pc = poptGetContext(nullptr, argc, argv, long_options, 0);
poptReadDefaultConfig(pc, 0);
while ((opt = poptGetNextOpt(pc)) != -1) {
if (!opt_session_name) {
session_name = get_session_name();
- if (session_name == NULL) {
+ if (session_name == nullptr) {
command_ret = CMD_ERROR;
goto end;
}
#ifdef LTTNG_EMBED_HELP
#include <lttng-track.1.h>
#else
- NULL
+ nullptr
#endif
;
#ifdef LTTNG_EMBED_HELP
#include <lttng-untrack.1.h>
#else
- NULL
+ nullptr
#endif
;