X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fstatus.cpp;fp=src%2Fbin%2Flttng%2Fcommands%2Fstatus.cpp;h=82a26c5b2752c026fde647eb8184e65d3a4c6604;hp=cd05bf313be1915a2f2bfe4851182b4710ea03b0;hb=cd9adb8b829564212158943a0d279bb35322ab30;hpb=e665dfbce25215d5ec77ff03a279c7163b337db1 diff --git a/src/bin/lttng/commands/status.cpp b/src/bin/lttng/commands/status.cpp index cd05bf313..82a26c5b2 100644 --- a/src/bin/lttng/commands/status.cpp +++ b/src/bin/lttng/commands/status.cpp @@ -31,16 +31,16 @@ enum { static struct poptOption long_options[] = { /* longName, shortName, argInfo, argPtr, value, descrip, argDesc */ - { "help", 'h', POPT_ARG_NONE, NULL, OPT_HELP, NULL, NULL }, - { "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 } }; -static int status(void) +static int status() { const char *argv[2]; int ret = CMD_SUCCESS; - char *session_name = NULL; + char *session_name = nullptr; session_name = get_session_name(); if (!session_name) { @@ -64,7 +64,7 @@ int cmd_status(int argc, const char **argv) int opt, ret = CMD_SUCCESS; static poptContext pc; - pc = poptGetContext(NULL, argc, argv, long_options, 0); + pc = poptGetContext(nullptr, argc, argv, long_options, 0); poptReadDefaultConfig(pc, 0); while ((opt = poptGetNextOpt(pc)) != -1) { @@ -81,7 +81,7 @@ int cmd_status(int argc, const char **argv) } } - if (poptPeekArg(pc) != NULL) { + if (poptPeekArg(pc) != nullptr) { ERR("This command does not accept positional arguments.\n"); ret = CMD_UNDEFINED; goto end;