Fix: Report the sequence's length field's value as length
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 21 May 2014 15:38:08 +0000 (11:38 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 21 May 2014 17:43:55 +0000 (13:43 -0400)
bt_ctf_get_field_list currently returns the underlying array's
size which is always the highest element count encountered to
date.

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

index 8174293b28e85b80b2038ecec808c3490488636f..bd195b93d7803d0d2584f18f615dd189819405eb 100644 (file)
@@ -255,7 +255,7 @@ int bt_ctf_get_field_list(const struct bt_ctf_event *ctf_event,
                        goto error;
                if (def_sequence->elems->pdata) {
                        *list = (struct bt_definition const* const*) def_sequence->elems->pdata;
                        goto error;
                if (def_sequence->elems->pdata) {
                        *list = (struct bt_definition const* const*) def_sequence->elems->pdata;
-                       *count = def_sequence->elems->len;
+                       *count = (unsigned int) def_sequence->length->value._unsigned;
                        goto end;
                } else {
                        goto error;
                        goto end;
                } else {
                        goto error;
This page took 0.024463 seconds and 4 git commands to generate.