Fix sessiond needed checks
[lttng-tools.git] / src / bin / lttng / lttng.c
index 6e16995a9d71a88e332e8f616e8971acb7628a75..57927d4f3d301f87ceb11a0ec85ea489b4e3f4bd 100644 (file)
@@ -351,7 +351,7 @@ static int check_sessiond(void)
                        pathname = opt_sessiond_path;
                } else {
                        /* Try LTTNG_SESSIOND_PATH env variable */
-                       pathname = getenv(LTTNG_SESSIOND_PATH_ENV);
+                       pathname = getenv(DEFAULT_SESSIOND_PATH_ENV);
                }
 
                /* Let's rock and roll */
@@ -387,9 +387,9 @@ static int check_args_no_sessiond(int argc, char **argv)
        int i;
 
        for (i = 0; i < argc; i++) {
-               if ((strncmp(argv[i], "-h", 2) == 0) ||
-                               strncmp(argv[i], "--h", 3) == 0 ||
-                               strncmp(argv[i], "--list-options", 14)) {
+               if ((strncmp(argv[i], "-h", sizeof("-h")) == 0) ||
+                               strncmp(argv[i], "--h", sizeof("--h")) == 0 ||
+                               strncmp(argv[i], "--list-options", sizeof("--list-options")) == 0) {
                        return 1;
                }
        }
This page took 0.025174 seconds and 4 git commands to generate.