X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Flib%2Ftrace-ir%2Ffield.c;h=91e918dda74bce7fbf559f605b840502bb506c69;hb=17f3083a0b4d318d3303c8a5bfa63db6a874ec73;hp=8db595ec87fffa60d3c42bfc197f02fc7f8cf5b5;hpb=6ecdcca3de0dea694cdfb252160c7939f7dc2ef1;p=babeltrace.git diff --git a/src/lib/trace-ir/field.c b/src/lib/trace-ir/field.c index 8db595ec..91e918dd 100644 --- a/src/lib/trace-ir/field.c +++ b/src/lib/trace-ir/field.c @@ -797,6 +797,7 @@ bt_field_enumeration_unsigned_get_mapping_labels( { const struct bt_field_integer *int_field = (const void *) field; + BT_ASSERT_PRE_DEV_NO_ERROR(); BT_ASSERT_PRE_DEV_NON_NULL(field, "Field"); BT_ASSERT_PRE_DEV_NON_NULL(label_array, "Label array (output)"); BT_ASSERT_PRE_DEV_NON_NULL(label_array, "Count (output)"); @@ -816,6 +817,7 @@ bt_field_enumeration_signed_get_mapping_labels( { const struct bt_field_integer *int_field = (const void *) field; + BT_ASSERT_PRE_DEV_NO_ERROR(); BT_ASSERT_PRE_DEV_NON_NULL(field, "Field"); BT_ASSERT_PRE_DEV_NON_NULL(label_array, "Label array (output)"); BT_ASSERT_PRE_DEV_NON_NULL(label_array, "Count (output)"); @@ -862,6 +864,7 @@ void clear_string_field(struct bt_field *field) enum bt_field_string_set_value_status bt_field_string_set_value( struct bt_field *field, const char *value) { + BT_ASSERT_PRE_DEV_NO_ERROR(); BT_ASSERT_PRE_DEV_NON_NULL(field, "Field"); BT_ASSERT_PRE_DEV_NON_NULL(value, "Value"); BT_ASSERT_PRE_DEV_FIELD_HOT(field, "Field"); @@ -875,6 +878,8 @@ enum bt_field_string_set_value_status bt_field_string_set_value( enum bt_field_string_append_status bt_field_string_append( struct bt_field *field, const char *value) { + BT_ASSERT_PRE_DEV_NO_ERROR(); + return bt_field_string_append_with_length(field, value, (uint64_t) strlen(value)); } @@ -886,6 +891,7 @@ enum bt_field_string_append_status bt_field_string_append_with_length( char *data; uint64_t new_length; + BT_ASSERT_PRE_DEV_NO_ERROR(); BT_ASSERT_PRE_DEV_NON_NULL(field, "Field"); BT_ASSERT_PRE_DEV_NON_NULL(value, "Value"); BT_ASSERT_PRE_DEV_FIELD_HOT(field, "Field"); @@ -935,6 +941,7 @@ enum bt_field_array_dynamic_set_length_status bt_field_array_dynamic_set_length( int ret = BT_FUNC_STATUS_OK; struct bt_field_array *array_field = (void *) field; + BT_ASSERT_PRE_DEV_NO_ERROR(); BT_ASSERT_PRE_DEV_NON_NULL(field, "Field"); BT_ASSERT_PRE_DEV_FIELD_IS_DYNAMIC_ARRAY(field, "Field"); BT_ASSERT_PRE_DEV_FIELD_HOT(field, "Field"); @@ -1171,6 +1178,7 @@ bt_field_variant_select_option_field_by_index( { struct bt_field_variant *var_field = (void *) field; + BT_ASSERT_PRE_DEV_NO_ERROR(); BT_ASSERT_PRE_DEV_NON_NULL(field, "Field"); BT_ASSERT_PRE_DEV_FIELD_IS_VARIANT(field, "Field"); BT_ASSERT_PRE_DEV_FIELD_HOT(field, "Field");