X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=doc%2Fexamples%2Ftrigger-condition-event-matches%2Fnotification-client.c;fp=doc%2Fexamples%2Ftrigger-condition-event-matches%2Fnotification-client.c;h=4a251556938d335630652d3208d599ecceb78a54;hp=7437b6a3cd5be880d63d384240fef3d6350afa2c;hb=a0377dfefe40662ba7d68617bce6ff467114136c;hpb=cc3b9644f017a91d347d7a414387292e3175635e diff --git a/doc/examples/trigger-condition-event-matches/notification-client.c b/doc/examples/trigger-condition-event-matches/notification-client.c index 7437b6a3c..4a2515569 100644 --- a/doc/examples/trigger-condition-event-matches/notification-client.c +++ b/doc/examples/trigger-condition-event-matches/notification-client.c @@ -7,7 +7,6 @@ #include -#include #include #include #include @@ -17,6 +16,8 @@ #include #include +#include + static int print_capture(const struct lttng_condition *condition, const struct lttng_event_field_value *capture, unsigned int indent_level); @@ -84,13 +85,13 @@ static void print_one_event_expr(const struct lttng_event_expr *event_expr) parent_expr = lttng_event_expr_array_field_element_get_parent_expr( event_expr); - assert(parent_expr != NULL); + LTTNG_ASSERT(parent_expr != NULL); print_one_event_expr(parent_expr); status = lttng_event_expr_array_field_element_get_index( event_expr, &index); - assert(status == LTTNG_EVENT_EXPR_STATUS_OK); + LTTNG_ASSERT(status == LTTNG_EVENT_EXPR_STATUS_OK); printf("[%u]", index); @@ -257,7 +258,7 @@ static int print_array(const struct lttng_condition *condition, const struct lttng_event_expr *expr = lttng_condition_event_rule_matches_get_capture_descriptor_at_index( condition, i); - assert(expr); + LTTNG_ASSERT(expr); indent(indent_level + 1); @@ -308,7 +309,7 @@ static int print_captures(struct lttng_notification *notification) const struct lttng_event_field_value *captured_field_array = NULL; unsigned int expected_capture_field_count; - assert(lttng_evaluation_get_type(evaluation) == + LTTNG_ASSERT(lttng_evaluation_get_type(evaluation) == LTTNG_CONDITION_TYPE_EVENT_RULE_MATCHES); condition_status =