Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / bin / lttng / commands / list.cpp
index 9046c465885424160ffe63ae878c92b35ce42fa1..8636cd101850d5557e489e2671add4ede354e4cc 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
-#include <common/mi-lttng.h>
-#include <common/time.h>
-#include <common/tracker.h>
-#include <lttng/domain-internal.h>
+#include <common/mi-lttng.hpp>
+#include <common/time.hpp>
+#include <common/tracker.hpp>
+#include <lttng/domain-internal.hpp>
 #include <lttng/lttng.h>
 
-#include "../command.h"
+#include "../command.hpp"
 
 static int opt_userspace;
 static int opt_kernel;
@@ -91,11 +91,12 @@ static char *get_cmdline_by_pid(pid_t pid)
        }
 
        /* Caller must free() *cmdline */
-       cmdline = (char *) zmalloc(PATH_MAX);
+       cmdline = zmalloc<char>(PATH_MAX);
        if (!cmdline) {
                PERROR("malloc cmdline");
                goto end;
        }
+
        ret = fread(cmdline, 1, PATH_MAX, fp);
        if (ret < 0) {
                PERROR("fread proc list");
This page took 0.024631 seconds and 4 git commands to generate.