An integer of 0 bits is not very useful.
Change-Id: I00a4114dc4a949a4876f810f603226a1c5936751
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/3385
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
@bt_pre_hot{field_class}
@bt_pre_is_int_fc{field_class}
@pre
@bt_pre_hot{field_class}
@bt_pre_is_int_fc{field_class}
@pre
@sa bt_field_class_integer_get_field_value_range() —
Returns the field value range of an integer field class.
@sa bt_field_class_integer_get_field_value_range() —
Returns the field value range of an integer field class.
BT_ASSERT_PRE_NON_NULL(fc, "Field class");
BT_ASSERT_PRE_FC_IS_INT(fc, "Field class");
BT_ASSERT_PRE_DEV_FC_HOT(fc, "Field class");
BT_ASSERT_PRE_NON_NULL(fc, "Field class");
BT_ASSERT_PRE_FC_IS_INT(fc, "Field class");
BT_ASSERT_PRE_DEV_FC_HOT(fc, "Field class");
- BT_ASSERT_PRE(size <= 64,
+ BT_ASSERT_PRE(size >= 1 && size <= 64,
"Unsupported size for integer field class's field value range "
"Unsupported size for integer field class's field value range "
- "(maximum is 64): size=%" PRIu64, size);
+ "(minimum is 1, maximum is 64): size=%" PRIu64, size);
BT_ASSERT_PRE(
int_fc->common.type == BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER ||
int_fc->common.type == BT_FIELD_CLASS_TYPE_SIGNED_INTEGER ||
BT_ASSERT_PRE(
int_fc->common.type == BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER ||
int_fc->common.type == BT_FIELD_CLASS_TYPE_SIGNED_INTEGER ||