projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src.ctf.fs: keep empty structures
[babeltrace.git]
/
plugins
/
ctf
/
common
/
metadata
/
ctf-meta-translate.c
diff --git
a/plugins/ctf/common/metadata/ctf-meta-translate.c
b/plugins/ctf/common/metadata/ctf-meta-translate.c
index 608db66fd95fd82493b6da8dd38bc0a9c7212b75..b116c0539119ff45840d52dc7a7d7aeda3f4ea63 100644
(file)
--- a/
plugins/ctf/common/metadata/ctf-meta-translate.c
+++ b/
plugins/ctf/common/metadata/ctf-meta-translate.c
@@
-326,6
+326,16
@@
bool ctf_field_class_struct_has_immediate_member_in_ir(
uint64_t i;
bool has_immediate_member_in_ir = false;
uint64_t i;
bool has_immediate_member_in_ir = false;
+ /*
+ * If the structure field class has no members at all, then it
+ * was an empty structure in the beginning, so leave it existing
+ * and empty.
+ */
+ if (fc->members->len == 0) {
+ has_immediate_member_in_ir = true;
+ goto end;
+ }
+
for (i = 0; i < fc->members->len; i++) {
struct ctf_named_field_class *named_fc =
ctf_field_class_struct_borrow_member_by_index(fc, i);
for (i = 0; i < fc->members->len; i++) {
struct ctf_named_field_class *named_fc =
ctf_field_class_struct_borrow_member_by_index(fc, i);
This page took
0.029413 seconds
and
4
git commands to generate.