Standardize *get_*() functions
[babeltrace.git] / lib / ctf-ir / fields.c
index c43b4afa4e57da06a5c0890d2a7a7e514551f23f..28a5e9375a883e5e40db47e4babd25c2e1c02bc1 100644 (file)
@@ -469,7 +469,7 @@ end:
        return ret;
 }
 
-struct bt_ctf_field *bt_ctf_field_structure_get_field(
+struct bt_ctf_field *bt_ctf_field_structure_get_field_by_name(
                struct bt_ctf_field *field, const char *name)
 {
        struct bt_ctf_field *new_field = NULL;
@@ -520,7 +520,7 @@ error:
 }
 
 struct bt_ctf_field *bt_ctf_field_structure_get_field_by_index(
-               struct bt_ctf_field *field, int index)
+               struct bt_ctf_field *field, uint64_t index)
 {
        int ret;
        const char *field_name;
@@ -674,7 +674,7 @@ struct bt_ctf_field *bt_ctf_field_sequence_get_field(struct bt_ctf_field *field,
        }
 
        sequence = container_of(field, struct bt_ctf_field_sequence, parent);
-       if (!sequence->elements || sequence->elements->len <= index) {
+       if (!sequence->elements || index >= sequence->elements->len) {
                goto end;
        }
 
This page took 0.023543 seconds and 4 git commands to generate.