Replace hackish use of bt_ctf_field_validate by is_set
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 17 Nov 2016 22:40:18 +0000 (17:40 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 27 May 2017 18:09:06 +0000 (14:09 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/ir/stream.c

index 8c5a9877fb3dceae1aadf01aae9476a868d93a0a..2f852373044d042fe3a3b40616102c9ce885a59a 100644 (file)
@@ -61,7 +61,7 @@ int set_packet_header_magic(struct bt_ctf_stream *stream)
                goto end;
        }
 
-       if (!bt_ctf_field_validate(magic_field)) {
+       if (bt_ctf_field_is_set(magic_field)) {
                /* Value already set. Not an error, skip. */
                goto end;
        }
@@ -113,7 +113,7 @@ int set_packet_header_uuid(struct bt_ctf_stream *stream)
                goto end;
        }
 
-       if (!bt_ctf_field_validate(uuid_field)) {
+       if (bt_ctf_field_is_set(uuid_field)) {
                /* Value already set. Not an error, skip. */
                goto end;
        }
@@ -186,7 +186,7 @@ int set_packet_header_stream_id(struct bt_ctf_stream *stream)
                goto end;
        }
 
-       if (!bt_ctf_field_validate(stream_id_field)) {
+       if (bt_ctf_field_is_set(stream_id_field)) {
                /* Value already set. Not an error, skip. */
                goto end;
        }
@@ -959,7 +959,7 @@ int set_structure_field_integer(struct bt_ctf_field *structure, char *name,
        }
 
        /* Make sure the payload has not already been set. */
-       if (!bt_ctf_field_validate(integer)) {
+       if (bt_ctf_field_is_set(integer)) {
                /* Payload already set, not an error */
                goto end;
        }
This page took 0.025498 seconds and 4 git commands to generate.