From 96373046295c5e5957610fefb278db9f1ffba370 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Wed, 17 May 2017 14:55:35 -0400 Subject: [PATCH] Fix: lib/ctf-ir/event-class.c: fix warnings on `ret` condition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- lib/ctf-ir/event-class.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ctf-ir/event-class.c b/lib/ctf-ir/event-class.c index 9786c88a8..4e71ab55a 100644 --- a/lib/ctf-ir/event-class.c +++ b/lib/ctf-ir/event-class.c @@ -378,7 +378,7 @@ bt_ctf_event_class_get_attribute_name_by_index( } ret = bt_ctf_attributes_get_field_name(event_class->attributes, index); - if (ret) { + if (!ret) { BT_LOGW("Cannot get event class's attribute name by index: " "addr=%p, name=\"%s\", id=%" PRId64 ", index=%" PRIu64, event_class, bt_ctf_event_class_get_name(event_class), @@ -402,7 +402,7 @@ bt_ctf_event_class_get_attribute_value_by_index( } ret = bt_ctf_attributes_get_field_value(event_class->attributes, index); - if (ret) { + if (!ret) { BT_LOGW("Cannot get event class's attribute value by index: " "addr=%p, name=\"%s\", id=%" PRId64 ", index=%" PRIu64, event_class, bt_ctf_event_class_get_name(event_class), @@ -429,7 +429,7 @@ bt_ctf_event_class_get_attribute_value_by_name( ret = bt_ctf_attributes_get_field_value_by_name(event_class->attributes, name); - if (ret) { + if (!ret) { BT_LOGV("Cannot find event class's attribute: " "addr=%p, event-class-name=\"%s\", id=%" PRId64 ", " "attr-name=\"%s\"", -- 2.34.1