X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fevent-rule%2Fuser-tracepoint.cpp;h=48040fc59292384310ae1ac4fb19e0332266b08b;hb=64803277bbdbe0a943360d918298a48157d9da55;hp=8932ca786c72c657ac11692c1de6d6228f3daa77;hpb=60f1b42d6280b6bd386abb726dca4fd3b31d8491;p=lttng-tools.git diff --git a/src/common/event-rule/user-tracepoint.cpp b/src/common/event-rule/user-tracepoint.cpp index 8932ca786..48040fc59 100644 --- 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; } - exclusions = (lttng_event_exclusion *) zmalloc(sizeof(struct lttng_event_exclusion) + - (LTTNG_SYMBOL_NAME_LEN * nb_exclusions)); + exclusions = zmalloc(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; @@ -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; - tp_rule = (lttng_event_rule_user_tracepoint *) zmalloc(sizeof(struct lttng_event_rule_user_tracepoint)); + tp_rule = zmalloc(); if (!tp_rule) { goto end; }