Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / bin / lttng-sessiond / tracker.cpp
index 1cae40350cbcd8c6466ce628fa6a00944539491c..7d587280645b0ebe72381075038994a15f17d605 100644 (file)
@@ -7,8 +7,8 @@
  */
 
 #include "lttng/tracker.h"
-#include "common/dynamic-array.h"
-#include "common/macros.h"
+#include "common/dynamic-array.hpp"
+#include "common/macros.hpp"
 #define _LGPL_SOURCE
 #include <grp.h>
 #include <pwd.h>
 #include <urcu/list.h>
 #include <urcu/rculfhash.h>
 
-#include "tracker.h"
-#include <common/defaults.h>
-#include <common/error.h>
-#include <common/hashtable/hashtable.h>
-#include <common/hashtable/utils.h>
-#include <common/tracker.h>
+#include "tracker.hpp"
+#include <common/defaults.hpp>
+#include <common/error.hpp>
+#include <common/hashtable/hashtable.hpp>
+#include <common/hashtable/utils.hpp>
+#include <common/tracker.hpp>
 #include <lttng/lttng-error.h>
 
 struct process_attr_tracker_value_node {
@@ -49,7 +49,7 @@ struct process_attr_tracker *process_attr_tracker_create(void)
 {
        struct process_attr_tracker *tracker;
 
-       tracker = (process_attr_tracker *) zmalloc(sizeof(*tracker));
+       tracker = zmalloc<process_attr_tracker>();
        if (!tracker) {
                return NULL;
        }
@@ -201,7 +201,7 @@ enum process_attr_tracker_status process_attr_tracker_inclusion_set_add_value(
                goto end;
        }
 
-       value_node = (process_attr_tracker_value_node *) zmalloc(sizeof(*value_node));
+       value_node = zmalloc<process_attr_tracker_value_node>();
        if (!value_node) {
                status = PROCESS_ATTR_TRACKER_STATUS_ERROR;
                goto end;
This page took 0.026115 seconds and 4 git commands to generate.