projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: trace_collection_add() add after check
[babeltrace.git]
/
lib
/
trace-collection.c
diff --git
a/lib/trace-collection.c
b/lib/trace-collection.c
index 608a6e458093f7f751a0807112f1c0b7ffa98c00..c5c875c975d64d4d76bd83822a12034218e0e528 100644
(file)
--- a/
lib/trace-collection.c
+++ b/
lib/trace-collection.c
@@
-164,8
+164,6
@@
int bt_trace_collection_add(struct trace_collection *tc,
return -EINVAL;
trace = container_of(td, struct ctf_trace, parent);
return -EINVAL;
trace = container_of(td, struct ctf_trace, parent);
- g_ptr_array_add(tc->array, td);
- trace->collection = tc;
if (tc->array->len > 1) {
struct clock_match clock_match = {
if (tc->array->len > 1) {
struct clock_match clock_match = {
@@
-187,6
+185,9
@@
int bt_trace_collection_add(struct trace_collection *tc,
}
}
}
}
+ g_ptr_array_add(tc->array, td);
+ trace->collection = tc;
+
{
struct clock_match clock_match = {
.clocks = tc->clocks,
{
struct clock_match clock_match = {
.clocks = tc->clocks,
This page took
0.024896 seconds
and
4
git commands to generate.