From: Jérémie Galarneau Date: Thu, 17 Nov 2016 22:40:18 +0000 (-0500) Subject: Replace hackish use of bt_ctf_field_validate by is_set X-Git-Tag: v2.0.0-pre1~705 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=fc47320a994c2f7f3bd4c736f8f8214c239104ce Replace hackish use of bt_ctf_field_validate by is_set Signed-off-by: Jérémie Galarneau --- diff --git a/formats/ctf/ir/stream.c b/formats/ctf/ir/stream.c index 8c5a9877..2f852373 100644 --- a/formats/ctf/ir/stream.c +++ b/formats/ctf/ir/stream.c @@ -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; }