X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Fwriter%2Fevent-fields.c;h=9eff2dca98b19e3cb8eaa995af7cf6be968038f9;hp=c4d1b968587e33f00f24f8efe0c0658c201e6ba6;hb=edcad9c1c88e6e698040855d7518d0c27dfc4489;hpb=024e61817685a20caceb4e3ef3bdc019a7af6b6e diff --git a/formats/ctf/writer/event-fields.c b/formats/ctf/writer/event-fields.c index c4d1b968..9eff2dca 100644 --- a/formats/ctf/writer/event-fields.c +++ b/formats/ctf/writer/event-fields.c @@ -30,6 +30,7 @@ #include #include #include +#include #define PACKET_LEN_INCREMENT (getpagesize() * 8 * CHAR_BIT) @@ -445,7 +446,7 @@ struct bt_ctf_field *bt_ctf_field_variant_get_field(struct bt_ctf_field *field, tag_enum_integer = container_of(tag_enum, struct bt_ctf_field_integer, parent); - if (!bt_ctf_field_validate(variant->tag)) { + if (bt_ctf_field_validate(tag_field) < 0) { goto end; } @@ -1241,7 +1242,7 @@ int increase_packet_size(struct ctf_stream_pos *pos) } pos->packet_size += PACKET_LEN_INCREMENT; - ret = posix_fallocate(pos->fd, pos->mmap_offset, + ret = bt_posix_fallocate(pos->fd, pos->mmap_offset, pos->packet_size / CHAR_BIT); if (ret) { goto end;