X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fhelp.cpp;fp=src%2Fbin%2Flttng%2Fcommands%2Fhelp.cpp;h=00af516de0129bef113303e0853738e057b06c5f;hp=5f6d86685b0892bdaf059140fe5bb27bbf7f50a0;hb=cd9adb8b829564212158943a0d279bb35322ab30;hpb=e665dfbce25215d5ec77ff03a279c7163b337db1 diff --git a/src/bin/lttng/commands/help.cpp b/src/bin/lttng/commands/help.cpp index 5f6d86685..00af516de 100644 --- a/src/bin/lttng/commands/help.cpp +++ b/src/bin/lttng/commands/help.cpp @@ -25,7 +25,7 @@ static const char *lttng_help_msg = #ifdef LTTNG_EMBED_HELP #include #else - NULL + nullptr #endif ; @@ -36,9 +36,9 @@ enum { static struct poptOption long_options[] = { /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */ - { "help", 'h', POPT_ARG_NONE, 0, OPT_HELP, 0, 0 }, - { "list-options", 0, POPT_ARG_NONE, NULL, OPT_LIST_OPTIONS, NULL, NULL }, - { 0, 0, 0, 0, 0, 0, 0 } + { "help", 'h', POPT_ARG_NONE, nullptr, OPT_HELP, nullptr, nullptr }, + { "list-options", 0, POPT_ARG_NONE, nullptr, OPT_LIST_OPTIONS, nullptr, nullptr }, + { nullptr, 0, 0, nullptr, 0, nullptr, nullptr } }; /* @@ -53,7 +53,7 @@ int cmd_help(int argc, const char **argv, const struct cmd_struct commands[]) int found = 0; const char *cmd_argv[2]; - pc = poptGetContext(NULL, argc, argv, long_options, 0); + pc = poptGetContext(nullptr, argc, argv, long_options, 0); poptReadDefaultConfig(pc, 0); while ((opt = poptGetNextOpt(pc)) != -1) { @@ -72,7 +72,7 @@ int cmd_help(int argc, const char **argv, const struct cmd_struct commands[]) /* Get command name */ arg_cmd_name = poptGetArg(pc); - if (arg_cmd_name == NULL) { + if (arg_cmd_name == nullptr) { /* Fall back to lttng(1) */ ret = utils_show_help(1, "lttng", lttng_help_msg); if (ret) { @@ -93,7 +93,7 @@ int cmd_help(int argc, const char **argv, const struct cmd_struct commands[]) /* Make sure command name exists */ cmd = &commands[0]; - while (cmd->name != NULL) { + while (cmd->name != nullptr) { if (strcmp(cmd->name, arg_cmd_name) == 0) { found = 1; break;