Force usage of assert() condition when NDEBUG is defined
[lttng-tools.git] / src / common / evaluation.c
index 2b06be614a73ddc788987b7ce711bf19e8cef6df..6b59949e39f00c45d867cad761715a85dffef6c1 100644 (file)
 #include <lttng/condition/buffer-usage-internal.h>
 #include <lttng/condition/session-consumed-size-internal.h>
 #include <lttng/condition/session-rotation-internal.h>
-#include <lttng/condition/on-event-internal.h>
+#include <lttng/condition/event-rule-matches-internal.h>
 #include <common/macros.h>
 #include <common/error.h>
 #include <stdbool.h>
-#include <assert.h>
 
 LTTNG_HIDDEN
 void lttng_evaluation_init(struct lttng_evaluation *evaluation,
@@ -117,12 +116,13 @@ ssize_t lttng_evaluation_create_from_payload(
                }
                evaluation_size += ret;
                break;
-       case LTTNG_CONDITION_TYPE_ON_EVENT:
-               assert(condition);
-               assert(condition->type == LTTNG_CONDITION_TYPE_ON_EVENT);
-               ret = lttng_evaluation_on_event_create_from_payload(
+       case LTTNG_CONDITION_TYPE_EVENT_RULE_MATCHES:
+               LTTNG_ASSERT(condition);
+               LTTNG_ASSERT(condition->type ==
+                               LTTNG_CONDITION_TYPE_EVENT_RULE_MATCHES);
+               ret = lttng_evaluation_event_rule_matches_create_from_payload(
                                container_of(condition,
-                                               const struct lttng_condition_on_event,
+                                               const struct lttng_condition_event_rule_matches,
                                                parent),
                                &evaluation_view, evaluation);
                if (ret < 0) {
@@ -154,6 +154,6 @@ void lttng_evaluation_destroy(struct lttng_evaluation *evaluation)
                return;
        }
 
-       assert(evaluation->destroy);
+       LTTNG_ASSERT(evaluation->destroy);
        evaluation->destroy(evaluation);
 }
This page took 0.023942 seconds and 4 git commands to generate.