uint64_t uint_val;
double dbl_val;
const char *str_val;
- int size;
GPtrArray *map_keys = NULL;
if (!value) {
break;
case BT_VALUE_TYPE_ARRAY:
{
- guint i;
+ uint64_t i, size;
size = bt_value_array_get_length(value);
- if (size < 0) {
- goto error;
- }
-
if (size == 0) {
print_indent(fp, indent);
fprintf(fp, "[ ]\n");
static const char * const comp_cls_name = "lttng-live";
static const bt_component_class_type comp_cls_type =
BT_COMPONENT_CLASS_TYPE_SOURCE;
- int64_t array_size, i;
+ uint64_t array_size, i;
const char *fail_reason = NULL;
FILE *out_stream = stdout;
int compute_stream_intersection(const bt_value *streams,
struct trace_range *range)
{
- unsigned int i;
- unsigned int stream_count;
+ uint64_t i, stream_count;
int ret;
BT_ASSERT(bt_value_get_type(streams) == BT_VALUE_TYPE_ARRAY);
{
int ret = 0;
uint64_t trace_idx;
- int64_t trace_count;
+ uint64_t trace_count;
const bt_value *query_result = NULL;
const bt_value *trace_info = NULL;
const bt_value *stream_infos = NULL;
}
trace_count = bt_value_array_get_length(query_result);
- if (trace_count < 0) {
+ if (trace_count == 0) {
BT_CLI_LOGE_APPEND_CAUSE("`babeltrace.trace-infos` query: result is empty: "
"component-class-name=%s", bt_component_class_get_name(comp_cls));
ret = -1;
}
stream_count = bt_value_array_get_length(stream_infos);
- if (stream_count < 0) {
+ if (stream_count == 0) {
ret = -1;
BT_CLI_LOGE_APPEND_CAUSE("`babeltrace.trace-infos` query: list of streams is empty: "
"component-class-name=%s",