Port: replace strerror_r() with glib g_strerror()
[babeltrace.git] / lib / ctf-ir / attributes.c
index 9e605690187105dc0f3dad0efd2c189a37161d61..ac97972429e40323cd2361d4c61ac93fb73bf64c 100644 (file)
@@ -31,6 +31,8 @@
 #include <babeltrace/babeltrace-internal.h>
 #include <babeltrace/values.h>
 #include <inttypes.h>
+#include <assert.h>
+#include <babeltrace/compat/string-internal.h>
 
 #define BT_CTF_ATTR_NAME_INDEX         0
 #define BT_CTF_ATTR_VALUE_INDEX                1
@@ -185,7 +187,7 @@ struct bt_value *bt_ctf_attributes_get_field_by_name(
                if (!attr_field_name_obj) {
                        BT_LOGE("Cannot get attribute array value's element by index: "
                                "value-addr=%p, index=%" PRIu64,
-                               value_obj, 0);
+                               value_obj, (int64_t) 0);
                        goto error;
                }
 
@@ -313,12 +315,7 @@ int bt_ctf_attributes_freeze(struct bt_value *attr_obj)
 
        BT_LOGD("Freezing attributes object: value-addr=%p", attr_obj);
        count = bt_value_array_size(attr_obj);
-       if (count < 0) {
-               BT_LOGE("Cannot get array value's size: value-addr=%p",
-                       attr_obj);
-               ret = -1;
-               goto end;
-       }
+       assert(count >= 0);
 
        /*
         * We do not freeze the array value object itself here, since
This page took 0.023728 seconds and 4 git commands to generate.