#define _LGPL_SOURCE
#include <stddef.h>
-#include <common/error.h>
-#include <common/sessiond-comm/sessiond-comm.h>
-#include <lttng/event-internal.h>
+#include <common/error.hpp>
+#include <common/sessiond-comm/sessiond-comm.hpp>
+#include <lttng/event-internal.hpp>
#include <lttng/event.h>
#include <lttng/lttng-error.h>
-#include <lttng/userspace-probe-internal.h>
+#include <lttng/userspace-probe-internal.hpp>
struct lttng_event *lttng_event_create(void)
{
struct lttng_event *event;
struct lttng_event_extended *event_extended;
- event = (lttng_event *) zmalloc(sizeof(*event));
+ event = zmalloc<lttng_event>();
if (!event) {
PERROR("Error allocating event structure");
goto end;
}
- event_extended = (lttng_event_extended *) zmalloc(sizeof(*event_extended));
+ event_extended = zmalloc<lttng_event_extended>();
if (!event_extended) {
PERROR("Error allocating event extended structure");
goto error;