Fix: Incorrect variant tag validation
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 12 Dec 2014 04:01:30 +0000 (23:01 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 12 Dec 2014 04:04:17 +0000 (23:04 -0500)
An erroneous tag validation causes bt_ctf_field_variant_get_field() to
fail when called a second time on a given variant field.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/writer/event-fields.c

index c4d1b968587e33f00f24f8efe0c0658c201e6ba6..461888f9b09498e0ea558d9b39b2ccd3aa46ce7f 100644 (file)
@@ -445,7 +445,7 @@ struct bt_ctf_field *bt_ctf_field_variant_get_field(struct bt_ctf_field *field,
        tag_enum_integer = container_of(tag_enum, struct bt_ctf_field_integer,
                parent);
 
-       if (!bt_ctf_field_validate(variant->tag)) {
+       if (bt_ctf_field_validate(tag_field) < 0) {
                goto end;
        }
 
This page took 0.03343 seconds and 4 git commands to generate.