Fix lint warnings
[babeltrace.git] / formats / ctf / writer / event-types.c
index 9b74b6e169954c23d244e1f2fe67fb53e4138588..fa4e71314a7dc213b6cd15e01ddde04c701e17ad 100644 (file)
@@ -190,6 +190,7 @@ static
 void bt_ctf_field_type_init(struct bt_ctf_field_type *type)
 {
        enum ctf_type_id type_id = type->declaration->id;
+       int ret;
 
        assert(type && (type_id > CTF_TYPE_UNKNOWN) &&
                (type_id < NR_CTF_TYPES));
@@ -197,7 +198,8 @@ void bt_ctf_field_type_init(struct bt_ctf_field_type *type)
        bt_ctf_ref_init(&type->ref_count);
        type->freeze = type_freeze_funcs[type_id];
        type->serialize = type_serialize_funcs[type_id];
-       bt_ctf_field_type_set_byte_order(type, BT_CTF_BYTE_ORDER_NATIVE);
+       ret = bt_ctf_field_type_set_byte_order(type, BT_CTF_BYTE_ORDER_NATIVE);
+       assert(!ret);
        type->declaration->alignment = 1;
 }
 
@@ -212,8 +214,8 @@ int add_structure_field(GPtrArray *fields,
        struct structure_field *field;
 
        /* Make sure structure does not contain a field of the same name */
-       if (g_hash_table_contains(field_name_to_index,
-                       GUINT_TO_POINTER(name_quark))) {
+       if (g_hash_table_lookup_extended(field_name_to_index,
+               GUINT_TO_POINTER(name_quark), NULL, NULL)) {
                ret = -1;
                goto end;
        }
This page took 0.040926 seconds and 4 git commands to generate.