Fix: cppcheck linter cleanups
[lttng-tools.git] / src / bin / lttng / commands / list.c
index 28e18644403142592ad2547476d8c41384d2163c..48b2c82763e3bb69a40987e9f42f41e765355037 100644 (file)
@@ -680,8 +680,7 @@ error:
  */
 int cmd_list(int argc, const char **argv)
 {
-       int opt, i, ret = CMD_SUCCESS;
-       int nb_domain;
+       int opt, ret = CMD_SUCCESS;
        const char *session_name;
        static poptContext pc;
        struct lttng_domain domain;
@@ -778,6 +777,8 @@ int cmd_list(int argc, const char **argv)
                                goto end;
                        }
                } else {
+                       int i, nb_domain;
+
                        /* We want all domain(s) */
                        nb_domain = lttng_list_domains(session_name, &domains);
                        if (nb_domain < 0) {
This page took 0.023544 seconds and 4 git commands to generate.