Fix: properly compare type enumeration
[lttng-modules.git] / lttng-filter.c
index c33fa5f281c77be6714be9ecbfe85b2a2c0787cc..05ce683ee72121a659cf620dcca2c3dcefb593c2 100644 (file)
@@ -244,7 +244,7 @@ int apply_field_reloc(struct lttng_event *event,
                {
                        const struct lttng_basic_type *elem_type = &field->type.u.array.elem_type;
 
-                       if (elem_type != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
+                       if (elem_type->atype != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
                                return -EINVAL;
                        if (field->user)
                                op->op = FILTER_OP_LOAD_FIELD_REF_USER_SEQUENCE;
@@ -256,7 +256,7 @@ int apply_field_reloc(struct lttng_event *event,
                {
                        const struct lttng_basic_type *elem_type = &field->type.u.sequence.elem_type;
 
-                       if (elem_type != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
+                       if (elem_type->atype != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
                                return -EINVAL;
                        if (field->user)
                                op->op = FILTER_OP_LOAD_FIELD_REF_USER_SEQUENCE;
@@ -332,7 +332,7 @@ int apply_context_reloc(struct lttng_event *event,
                {
                        const struct lttng_basic_type *elem_type = &ctx_field->event_field.type.u.array.elem_type;
 
-                       if (elem_type != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
+                       if (elem_type->atype != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
                                return -EINVAL;
                        BUG_ON(ctx_field->event_field.user);
                        op->op = FILTER_OP_GET_CONTEXT_REF_STRING;
@@ -342,7 +342,7 @@ int apply_context_reloc(struct lttng_event *event,
                {
                        const struct lttng_basic_type *elem_type = &ctx_field->event_field.type.u.sequence.elem_type;
 
-                       if (elem_type != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
+                       if (elem_type->atype != atype_integer || elem_type->u.basic.integer.encoding == lttng_encode_none)
                                return -EINVAL;
                        BUG_ON(ctx_field->event_field.user);
                        op->op = FILTER_OP_GET_CONTEXT_REF_STRING;
This page took 0.023473 seconds and 4 git commands to generate.