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
/
common
/
event-rule
/
user-tracepoint.cpp
diff --git
a/src/common/event-rule/user-tracepoint.cpp
b/src/common/event-rule/user-tracepoint.cpp
index 8932ca786c72c657ac11692c1de6d6228f3daa77..48040fc59292384310ae1ac4fb19e0332266b08b 100644
(file)
--- a/
src/common/event-rule/user-tracepoint.cpp
+++ b/
src/common/event-rule/user-tracepoint.cpp
@@
-362,8
+362,7
@@
lttng_event_rule_user_tracepoint_generate_exclusions(
goto end;
}
goto end;
}
- exclusions = (lttng_event_exclusion *) zmalloc(sizeof(struct lttng_event_exclusion) +
- (LTTNG_SYMBOL_NAME_LEN * nb_exclusions));
+ exclusions = zmalloc<lttng_event_exclusion>(sizeof(struct lttng_event_exclusion) + (LTTNG_SYMBOL_NAME_LEN * nb_exclusions));
if (!exclusions) {
PERROR("Failed to allocate exclusions buffer");
ret_status = LTTNG_EVENT_RULE_GENERATE_EXCLUSIONS_STATUS_OUT_OF_MEMORY;
if (!exclusions) {
PERROR("Failed to allocate exclusions buffer");
ret_status = LTTNG_EVENT_RULE_GENERATE_EXCLUSIONS_STATUS_OUT_OF_MEMORY;
@@
-560,7
+559,7
@@
struct lttng_event_rule *lttng_event_rule_user_tracepoint_create(void)
struct lttng_event_rule_user_tracepoint *tp_rule;
enum lttng_event_rule_status status;
struct lttng_event_rule_user_tracepoint *tp_rule;
enum lttng_event_rule_status status;
- tp_rule =
(lttng_event_rule_user_tracepoint *) zmalloc(sizeof(struct lttng_event_rule_user_tracepoint)
);
+ tp_rule =
zmalloc<lttng_event_rule_user_tracepoint>(
);
if (!tp_rule) {
goto end;
}
if (!tp_rule) {
goto end;
}
This page took
0.023245 seconds
and
4
git commands to generate.