- if (step && bt_value_is_integer(step)) {
- int64_t val;
-
- val = bt_value_integer_get(step);
- if (val >= 0) {
- counter->step = (uint64_t) val;
+ if (step) {
+ if (!bt_value_is_unsigned_integer(step)) {
+ BT_LOGE("`step` parameter: expecting an unsigned integer value: "
+ "type=%s", bt_common_value_type_string(
+ bt_value_get_type(step)));
+ goto error;