*
*/
-#include <common/error.h>
-#include <common/macros.h>
-#include <common/mi-lttng.h>
+#include <common/error.hpp>
+#include <common/macros.hpp>
+#include <common/mi-lttng.hpp>
#include <inttypes.h>
#include <limits.h>
-#include <lttng/condition/condition-internal.h>
-#include <lttng/condition/event-rule-matches-internal.h>
+#include <lttng/condition/condition-internal.hpp>
+#include <lttng/condition/event-rule-matches-internal.hpp>
#include <lttng/condition/event-rule-matches.h>
-#include <lttng/event-expr-internal.h>
+#include <lttng/event-expr-internal.hpp>
#include <lttng/event-expr.h>
-#include <lttng/event-field-value-internal.h>
-#include <lttng/event-rule/event-rule-internal.h>
+#include <lttng/event-field-value-internal.hpp>
+#include <lttng/event-rule/event-rule-internal.hpp>
#include <lttng/lttng-error.h>
#include <stdbool.h>
#include <stdint.h>
goto end;
}
- condition = (lttng_condition_event_rule_matches *) zmalloc(sizeof(struct lttng_condition_event_rule_matches));
+ condition = zmalloc<lttng_condition_event_rule_matches>();
if (!condition) {
return NULL;
}
goto end;
}
- descriptor = (lttng_capture_descriptor *) malloc(sizeof(*descriptor));
+ descriptor = malloc<lttng_capture_descriptor>();
if (descriptor == NULL) {
status = LTTNG_CONDITION_STATUS_ERROR;
goto end;
struct lttng_evaluation_event_rule_matches *hit;
struct lttng_evaluation *evaluation = NULL;
- hit = (lttng_evaluation_event_rule_matches *) zmalloc(sizeof(struct lttng_evaluation_event_rule_matches));
+ hit = zmalloc<lttng_evaluation_event_rule_matches>();
if (!hit) {
goto error;
}