}
downstream_port_count = port_count_fn(downstream_comp);
- BT_ASSERT(downstream_port_count >= 0);
for (i = 0; i < downstream_port_count; i++) {
const bt_port_input *in_downstream_port =
uint64_t i;
count = port_count_fn(comp);
- BT_ASSERT(count >= 0);
for (i = 0; i < count; i++) {
const bt_port_output *upstream_port = port_by_index_fn(comp, i);
g_hash_table_insert(fdc->cache, fd_internal->key, fd_internal);
}
- BT_ASSERT(fd_internal->ref_count >= 0);
-
fd_internal->ref_count++;
goto end;
goto end;
}
- if (unlikely(ctfser->offset_in_cur_packet_bits < 0 || size_bits >
- UINT64_MAX - ctfser->offset_in_cur_packet_bits)) {
+ if (unlikely(size_bits > UINT64_MAX - ctfser->offset_in_cur_packet_bits)) {
has_space_left = false;
goto end;
}
* Only read "stream_id" if get_unary_unsigned()
* succeeded.
*/
- if (ret || (!ret && *stream_id < 0)) {
+ if (ret) {
_BT_LOGE_NODE(node,
"Unexpected unary expression for event class's `stream_id` attribute.");
ret = -EINVAL;
props->exp_packet_total_size = notit->cur_exp_packet_total_size;
props->exp_packet_content_size = notit->cur_exp_packet_content_size;
props->stream_class_id = (uint64_t) notit->cur_stream_class_id;
- BT_ASSERT(props->stream_class_id >= 0);
props->data_stream_id = notit->cur_data_stream_id;
props->snapshots.discarded_events = notit->snapshots.discarded_events;
props->snapshots.packets = notit->snapshots.packets;
uint64_t i;
len = bt_field_array_get_length(seq);
- if (len < 0) {
- ret = -1;
- goto end;
- }
-
g_string_append(pretty->string, "[");
pretty->depth++;