#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <common/compat/time.h>
+#include <common/compat/time.hpp>
#include <sys/types.h>
#include <inttypes.h>
#include <stdlib.h>
#include <lttng/lttng.h>
#include <urcu/list.h>
-#include <common/common.h>
+#include <common/common.hpp>
-#include <bin/lttng-relayd/lttng-viewer-abi.h>
-#include <common/index/ctf-index.h>
+#include <bin/lttng-relayd/lttng-viewer-abi.hpp>
+#include <common/index/ctf-index.hpp>
-#include <common/compat/errno.h>
-#include <common/compat/endian.h>
+#include <common/compat/errno.hpp>
+#include <common/compat/endian.hpp>
#define SESSION1 "test1"
#define RELAYD_URL "net://localhost"
int i;
ssize_t ret_len;
- session = (live_session *) zmalloc(sizeof(struct live_session));
+ session = zmalloc<live_session>();
if (!session) {
goto error;
}
diag("Got session stream count == 0");
goto error;
}
- session->streams = (viewer_stream *) zmalloc(session->stream_count *
- sizeof(struct viewer_stream));
+ session->streams = calloc<viewer_stream>(session->stream_count);
if (!session->streams) {
goto error;
}
goto error;
}
- data = (char *) zmalloc(len);
+ data = calloc<char>(len);
if (!data) {
PERROR("relay data zmalloc");
goto error;