while (!ctf_pos_access_ok(pos,
offset_align(pos->offset,
field->type->declaration->alignment))) {
- increase_packet_size(pos);
+ ret = increase_packet_size(pos);
+ if (ret) {
+ goto end;
+ }
}
ctf_align_pos(pos, field->type->declaration->alignment);
break;
}
}
-
+end:
return ret;
}
int ret = 0;
size_t i;
uint64_t timestamp_begin, timestamp_end;
- struct bt_ctf_stream_class *stream_class = stream->stream_class;
+ struct bt_ctf_stream_class *stream_class;
struct bt_ctf_field *integer = NULL;
struct ctf_stream_pos packet_context_pos;
stream->flush.func(stream, stream->flush.data);
}
+ stream_class = stream->stream_class;
timestamp_begin = ((struct bt_ctf_event *) g_ptr_array_index(
stream->events, 0))->timestamp;
timestamp_end = ((struct bt_ctf_event *) g_ptr_array_index(
stream = container_of(ref, struct bt_ctf_stream, ref_count);
ctf_fini_pos(&stream->pos);
- close(stream->pos.fd);
+ if (close(stream->pos.fd)) {
+ perror("close");
+ }
bt_ctf_stream_class_put(stream->stream_class);
g_ptr_array_free(stream->events, TRUE);
g_free(stream);