struct bt_ctf_field *events_discarded_field = NULL;
struct bt_ctf_field_type *events_discarded_field_type = NULL;
- if (!stream || !count || !stream->packet_context) {
+ if (!stream || !count || !stream->packet_context ||
+ stream->pos.fd < 0) {
ret = -1;
goto end;
}
struct bt_ctf_field *events_discarded_field = NULL;
struct bt_ctf_field_type *events_discarded_field_type = NULL;
- if (!stream || !stream->packet_context) {
+ if (!stream || !stream->packet_context || stream->pos.fd < 0) {
goto end;
}
{
int ret = 0;
- if (!stream || !event) {
+ if (!stream || !event || stream->pos.fd < 0) {
ret = -1;
goto end;
}
{
struct bt_ctf_field *packet_context = NULL;
- if (!stream) {
+ if (!stream || stream->pos.fd < 0) {
goto end;
}
int ret = 0;
struct bt_ctf_field_type *field_type;
- if (!stream || !field) {
+ if (!stream || !field || stream->pos.fd < 0) {
ret = -1;
goto end;
}
{
struct bt_ctf_field *packet_header = NULL;
- if (!stream) {
+ if (!stream || stream->pos.fd < 0) {
goto end;
}
struct bt_ctf_trace *trace = NULL;
struct bt_ctf_field_type *field_type = NULL;
- if (!stream || !field) {
+ if (!stream || !field || stream->pos.fd < 0) {
ret = -1;
goto end;
}