Standardize `!ptr` i/o `ptr == NULL`, `ptr` i/o `ptr != NULL`
[babeltrace.git] / src / lib / trace-ir / trace.c
index 6deecb1d80d4eef7f24ba673c00126b3f0eaefa7..0f683fb44e182c778198e8ef64892c753a6bb2bb 100644 (file)
@@ -239,7 +239,7 @@ bool trace_has_environment_entry(const struct bt_trace *trace, const char *name)
        BT_ASSERT(trace);
 
        return bt_attributes_borrow_field_value_by_name(
-               trace->environment, name) != NULL;
+               trace->environment, name);
 }
 
 static
@@ -305,7 +305,7 @@ bt_trace_set_environment_entry_integer(
        struct bt_value *value_obj;
        BT_ASSERT_PRE_NON_NULL(trace, "Trace");
        BT_ASSERT_PRE_NON_NULL(name, "Name");
-       value_obj = bt_value_signed_integer_create_init(value);
+       value_obj = bt_value_integer_signed_create_init(value);
        if (!value_obj) {
                BT_LIB_LOGE_APPEND_CAUSE(
                        "Cannot create an integer value object.");
@@ -444,14 +444,13 @@ enum bt_trace_add_listener_status bt_trace_add_destruction_listener(
        return BT_FUNC_STATUS_OK;
 }
 
-BT_ASSERT_PRE_FUNC
 static
 bool has_listener_id(const struct bt_trace *trace, uint64_t listener_id)
 {
        BT_ASSERT(listener_id < trace->destruction_listeners->len);
        return (&g_array_index(trace->destruction_listeners,
                        struct bt_trace_destruction_listener_elem,
-                       listener_id))->func != NULL;
+                       listener_id))->func;
 }
 
 enum bt_trace_remove_listener_status bt_trace_remove_destruction_listener(
This page took 0.024165 seconds and 4 git commands to generate.