Fix: lib/ctf-ir/event-class.c: fix warnings on `ret` condition
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 17 May 2017 18:55:35 +0000 (14:55 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:43 +0000 (12:57 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/ctf-ir/event-class.c

index 9786c88a86020b357a55aa752e5818d011bba44e..4e71ab55ac17abe00caaf9a2de426598157822be 100644 (file)
@@ -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\"",
This page took 0.026286 seconds and 4 git commands to generate.