clang-tidy: add Chrome-inspired checks
[lttng-tools.git] / src / bin / lttng / commands / stop.cpp
index 37b00417d40c0a30a1c04ca83bfbc5c4c710110c..a6d3d6711acc9ad083a1ccaa10348cddf0797a1b 100644 (file)
@@ -35,10 +35,10 @@ 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 },
-       { "no-wait", 'n', POPT_ARG_VAL, &opt_no_wait, 1, 0, 0 },
-       { 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 },
+       { "no-wait", 'n', POPT_ARG_VAL, &opt_no_wait, 1, nullptr, nullptr },
+       { nullptr, 0, 0, nullptr, 0, nullptr, nullptr }
 };
 
 /*
@@ -83,16 +83,16 @@ static int stop_tracing(const char *arg_session_name)
        int ret;
        char *session_name;
 
-       if (arg_session_name == NULL) {
+       if (arg_session_name == nullptr) {
                session_name = get_session_name();
        } else {
                session_name = strdup(arg_session_name);
-               if (session_name == NULL) {
+               if (session_name == nullptr) {
                        PERROR("Failed to copy session name");
                }
        }
 
-       if (session_name == NULL) {
+       if (session_name == nullptr) {
                ret = CMD_ERROR;
                goto error;
        }
@@ -160,10 +160,10 @@ int cmd_stop(int argc, const char **argv)
 {
        int opt, ret = CMD_SUCCESS, command_ret = CMD_SUCCESS, success = 1;
        static poptContext pc;
-       const char *arg_session_name = NULL;
-       const char *leftover = NULL;
+       const char *arg_session_name = nullptr;
+       const char *leftover = nullptr;
 
-       pc = poptGetContext(NULL, argc, argv, long_options, 0);
+       pc = poptGetContext(nullptr, argc, argv, long_options, 0);
        poptReadDefaultConfig(pc, 0);
 
        while ((opt = poptGetNextOpt(pc)) != -1) {
This page took 0.023826 seconds and 4 git commands to generate.