projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: remove dead code
[babeltrace.git]
/
lib
/
ctf-ir
/
attributes.c
diff --git
a/lib/ctf-ir/attributes.c
b/lib/ctf-ir/attributes.c
index 2cd3a4bf63acfc4d8c169795654dbdec4fdcf911..ac97972429e40323cd2361d4c61ac93fb73bf64c 100644
(file)
--- a/
lib/ctf-ir/attributes.c
+++ b/
lib/ctf-ir/attributes.c
@@
-26,11
+26,13
@@
*/
#define BT_LOG_TAG "ATTRS"
*/
#define BT_LOG_TAG "ATTRS"
+#include <babeltrace/lib-logging-internal.h>
#include <babeltrace/babeltrace-internal.h>
#include <babeltrace/values.h>
#include <inttypes.h>
#include <babeltrace/babeltrace-internal.h>
#include <babeltrace/values.h>
#include <inttypes.h>
-#include <babeltrace/lib-logging-internal.h>
+#include <assert.h>
+#include <babeltrace/compat/string-internal.h>
#define BT_CTF_ATTR_NAME_INDEX 0
#define BT_CTF_ATTR_VALUE_INDEX 1
#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,
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;
}
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);
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
/*
* We do not freeze the array value object itself here, since
This page took
0.024454 seconds
and
4
git commands to generate.