#include <stdint.h>
#include <unistd.h>
-#include <babeltrace2/ctf-writer/field-types.h>
-#include <babeltrace2/ctf-writer/object.h>
-#include <babeltrace2/ctf-writer/stream-class.h>
-#include <babeltrace2/ctf-writer/stream.h>
-#include <babeltrace2/ctf-writer/trace.h>
+#include <babeltrace2-ctf-writer/field-types.h>
+#include <babeltrace2-ctf-writer/object.h>
+#include <babeltrace2-ctf-writer/stream-class.h>
+#include <babeltrace2-ctf-writer/stream.h>
+#include <babeltrace2-ctf-writer/trace.h>
#include "common/align.h"
#include "common/assert.h"
stream_class_id, stream->common.id);
file_path = g_build_filename(writer->path->str, filename->str, NULL);
- if (file_path == NULL) {
+ if (!file_path) {
ret = -1;
goto end;
}
packet_size_field = bt_ctf_field_structure_get_field_by_name(
stream->packet_context, "packet_size");
- has_packet_size = (packet_size_field != NULL);
+ has_packet_size = packet_size_field;
bt_ctf_object_put_ref(packet_size_field);
}
static
int _set_structure_field_integer(struct bt_ctf_field *structure, char *name,
- uint64_t value, bt_bool force)
+ uint64_t value, bt_ctf_bool force)
{
int ret = 0;
struct bt_ctf_field_type *field_type = NULL;
int try_set_structure_field_integer(struct bt_ctf_field *structure, char *name,
uint64_t value)
{
- return _set_structure_field_integer(structure, name, value, BT_FALSE);
+ return _set_structure_field_integer(structure, name, value, BT_CTF_FALSE);
}
struct bt_ctf_stream_class *bt_ctf_stream_get_class(