projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lttng-sessiond: remove goto in ust_metadata_channel_statedump
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
ust-metadata.cpp
diff --git
a/src/bin/lttng-sessiond/ust-metadata.cpp
b/src/bin/lttng-sessiond/ust-metadata.cpp
index b507f7870e687841abe139c17b1a805b42c97612..d08cb40ae7f10ade8a8add223997a2e7aa884bed 100644
(file)
--- a/
src/bin/lttng-sessiond/ust-metadata.cpp
+++ b/
src/bin/lttng-sessiond/ust-metadata.cpp
@@
-899,7
+899,7
@@
end:
int ust_metadata_channel_statedump(struct ust_registry_session *session,
struct ust_registry_channel *chan)
{
int ust_metadata_channel_statedump(struct ust_registry_session *session,
struct ust_registry_channel *chan)
{
- int ret
= 0
;
+ int ret;
/* Don't dump metadata events */
if (chan->chan_id == -1U)
/* Don't dump metadata events */
if (chan->chan_id == -1U)
@@
-918,37
+918,40
@@
int ust_metadata_channel_statedump(struct ust_registry_session *session,
"struct event_header_compact" :
"struct event_header_large");
if (ret) {
"struct event_header_compact" :
"struct event_header_large");
if (ret) {
-
goto end
;
+
return ret
;
}
if (chan->ctx_fields) {
ret = lttng_metadata_printf(session,
" event.context := struct {\n");
if (ret) {
}
if (chan->ctx_fields) {
ret = lttng_metadata_printf(session,
" event.context := struct {\n");
if (ret) {
-
goto end
;
+
return ret
;
}
}
ret = _lttng_context_metadata_statedump(session,
chan->nr_ctx_fields,
chan->ctx_fields);
if (ret) {
}
}
ret = _lttng_context_metadata_statedump(session,
chan->nr_ctx_fields,
chan->ctx_fields);
if (ret) {
-
goto end
;
+
return ret
;
}
if (chan->ctx_fields) {
ret = lttng_metadata_printf(session,
" };\n");
if (ret) {
}
if (chan->ctx_fields) {
ret = lttng_metadata_printf(session,
" };\n");
if (ret) {
-
goto end
;
+
return ret
;
}
}
ret = lttng_metadata_printf(session,
"};\n\n");
}
}
ret = lttng_metadata_printf(session,
"};\n\n");
+ if (ret) {
+ return ret;
+ }
+
/* Flag success of metadata dump. */
chan->metadata_dumped = 1;
/* Flag success of metadata dump. */
chan->metadata_dumped = 1;
-end:
- return ret;
+ return 0;
}
static
}
static
This page took
0.024733 seconds
and
4
git commands to generate.