projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add type-checked versions of allocation and deallocations functions
[lttng-tools.git]
/
tests
/
regression
/
tools
/
live
/
live_test.cpp
diff --git
a/tests/regression/tools/live/live_test.cpp
b/tests/regression/tools/live/live_test.cpp
index afaf23b658442e2b407d509ab29cec878aba87e8..2da5b6fe4e069911af17dbda6bb386a1873f3686 100644
(file)
--- a/
tests/regression/tools/live/live_test.cpp
+++ b/
tests/regression/tools/live/live_test.cpp
@@
-9,7
+9,7
@@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <common/compat/time.h>
+#include <common/compat/time.h
pp
>
#include <sys/types.h>
#include <inttypes.h>
#include <stdlib.h>
#include <sys/types.h>
#include <inttypes.h>
#include <stdlib.h>
@@
-24,13
+24,13
@@
#include <lttng/lttng.h>
#include <urcu/list.h>
#include <lttng/lttng.h>
#include <urcu/list.h>
-#include <common/common.h>
+#include <common/common.h
pp
>
-#include <bin/lttng-relayd/lttng-viewer-abi.h>
-#include <common/index/ctf-index.h>
+#include <bin/lttng-relayd/lttng-viewer-abi.h
pp
>
+#include <common/index/ctf-index.h
pp
>
-#include <common/compat/errno.h>
-#include <common/compat/endian.h>
+#include <common/compat/errno.h
pp
>
+#include <common/compat/endian.h
pp
>
#define SESSION1 "test1"
#define RELAYD_URL "net://localhost"
#define SESSION1 "test1"
#define RELAYD_URL "net://localhost"
@@
-285,7
+285,7
@@
int attach_session(uint64_t id)
int i;
ssize_t ret_len;
int i;
ssize_t ret_len;
- session =
(live_session *) zmalloc(sizeof(struct live_session)
);
+ session =
zmalloc<live_session>(
);
if (!session) {
goto error;
}
if (!session) {
goto error;
}
@@
-327,8
+327,7
@@
int attach_session(uint64_t id)
diag("Got session stream count == 0");
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;
}
if (!session->streams) {
goto error;
}
@@
-436,7
+435,7
@@
retry:
goto error;
}
goto error;
}
- data =
(char *) zmalloc
(len);
+ data =
calloc<char>
(len);
if (!data) {
PERROR("relay data zmalloc");
goto error;
if (!data) {
PERROR("relay data zmalloc");
goto error;
@@
-675,7
+674,7
@@
error:
return ret;
}
return ret;
}
-int main(
int argc, char **argv
)
+int main(
void
)
{
int ret;
uint64_t session_id;
{
int ret;
uint64_t session_id;
This page took
0.025055 seconds
and
4
git commands to generate.