From: Philippe Proulx Date: Wed, 17 May 2017 18:55:35 +0000 (-0400) Subject: Fix: lib/ctf-ir/event-class.c: fix warnings on `ret` condition X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=96373046295c5e5957610fefb278db9f1ffba370;p=deliverable%2Fbabeltrace.git Fix: lib/ctf-ir/event-class.c: fix warnings on `ret` condition Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- 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\"",