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]
/
src
/
lib
/
lttng-ctl
/
channel.cpp
diff --git
a/src/lib/lttng-ctl/channel.cpp
b/src/lib/lttng-ctl/channel.cpp
index 080dbb4439659a33c10dc052e81f21b56251b4c9..3f3c53996ff2f461dda6b0d0030ee5f5dad89781 100644
(file)
--- a/
src/lib/lttng-ctl/channel.cpp
+++ b/
src/lib/lttng-ctl/channel.cpp
@@
-143,12
+143,12
@@
struct lttng_notification_channel *lttng_notification_channel_create(
goto end;
}
goto end;
}
- sock_path =
(char *) zmalloc
(LTTNG_PATH_MAX);
+ sock_path =
calloc<char>
(LTTNG_PATH_MAX);
if (!sock_path) {
goto end;
}
if (!sock_path) {
goto end;
}
- channel =
(lttng_notification_channel *) zmalloc(sizeof(struct lttng_notification_channel)
);
+ channel =
zmalloc<lttng_notification_channel>(
);
if (!channel) {
goto end;
}
if (!channel) {
goto end;
}
@@
-343,7
+343,7
@@
int enqueue_dropped_notification(
goto end;
}
goto end;
}
- pending_notification =
(struct pending_notification *) zmalloc(sizeof(*pending_notification)
);
+ pending_notification =
zmalloc<struct pending_notification>(
);
if (!pending_notification) {
ret = -1;
goto end;
if (!pending_notification) {
ret = -1;
goto end;
@@
-371,7
+371,7
@@
int enqueue_notification_from_current_message(
goto end;
}
goto end;
}
- pending_notification =
(struct pending_notification *) zmalloc(sizeof(*pending_notification)
);
+ pending_notification =
zmalloc<struct pending_notification>(
);
if (!pending_notification) {
ret = -1;
goto error;
if (!pending_notification) {
ret = -1;
goto error;
This page took
0.023349 seconds
and
4
git commands to generate.