Standardize `!ptr` i/o `ptr == NULL`, `ptr` i/o `ptr != NULL`
[babeltrace.git] / src / ctf-writer / stream.c
index da1228d6b3b6fc8f1392fc2abe9e882653202fc3..3f5e610094e7c45ef311070ca91032274d89c13a 100644 (file)
 #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"
@@ -1021,7 +1021,7 @@ append_ids:
                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;
        }
@@ -1627,7 +1627,7 @@ int bt_ctf_stream_flush(struct bt_ctf_stream *stream)
 
                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);
        }
 
@@ -1872,7 +1872,7 @@ void bt_ctf_stream_destroy(struct bt_ctf_object *obj)
 
 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;
@@ -1937,7 +1937,7 @@ static
 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(
This page took 0.02734 seconds and 4 git commands to generate.