Add type-checked versions of allocation and deallocations functions
[lttng-tools.git] / src / common / fd-handle.cpp
index d8b5b785d11679d25d045a08e4df0e93592c7072..579757782702f175315254b3003b001e1355bbae 100644 (file)
@@ -8,8 +8,8 @@
 #include <unistd.h>
 #include <urcu/ref.h>
 
-#include "fd-handle.h"
-#include <common/error.h>
+#include "fd-handle.hpp"
+#include <common/error.hpp>
 
 struct fd_handle {
        struct urcu_ref ref;
@@ -41,7 +41,7 @@ struct fd_handle *fd_handle_create(int fd)
                goto end;
        }
 
-       handle = (fd_handle *) zmalloc(sizeof(*handle));
+       handle = zmalloc<fd_handle>();
        if (!handle) {
                PERROR("Failed to allocate fd_handle");
                goto end;
This page took 0.024489 seconds and 4 git commands to generate.