From fc47320a994c2f7f3bd4c736f8f8214c239104ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 17 Nov 2016 17:40:18 -0500 Subject: [PATCH] Replace hackish use of bt_ctf_field_validate by is_set MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- formats/ctf/ir/stream.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; } -- 2.34.1