X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=lib%2Fctf-writer%2Fserialize.c;h=ce6b96b34d3ca9dedc7f92c74b3a44c7df77a318;hb=f6ccaed94e575af57fe6bf38154771bee4871a2a;hp=459cf9df9415fd40fb6ea084a20f0f403aa6c459;hpb=464ebc311d460b29f681703aea0aa00eef9e6475;p=babeltrace.git diff --git a/lib/ctf-writer/serialize.c b/lib/ctf-writer/serialize.c index 459cf9df..ce6b96b3 100644 --- a/lib/ctf-writer/serialize.c +++ b/lib/ctf-writer/serialize.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #if (FLT_RADIX != 2) @@ -72,7 +73,7 @@ int aligned_integer_write(struct bt_stream_pos *pos, if (!bt_stream_pos_access_ok(pos, size)) return -EFAULT; - assert(!(pos->offset % CHAR_BIT)); + BT_ASSERT(!(pos->offset % CHAR_BIT)); if (!is_signed) { switch (size) { case 8: @@ -271,7 +272,7 @@ void bt_stream_pos_packet_seek(struct bt_stream_pos *pos, size_t index, { int ret; - assert(whence == SEEK_CUR && index == 0); + BT_ASSERT(whence == SEEK_CUR && index == 0); if (pos->base_mma) { /* unmap old base */ @@ -290,7 +291,7 @@ void bt_stream_pos_packet_seek(struct bt_stream_pos *pos, size_t index, ret = bt_posix_fallocate(pos->fd, pos->mmap_offset, pos->packet_size / CHAR_BIT); } while (ret == EINTR); - assert(ret == 0); + BT_ASSERT(ret == 0); pos->offset = 0; /* map new base. Need mapping length from header. */