X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Flist.c;h=580b13f1f88d9943162078e0655a2bb47448599b;hp=210c2f437708ef6a7e0ec3531762b6c6cd25ad48;hb=1b2ef7fe9e5d6396484002b5ba20b798b45519f9;hpb=136f2f81ca23f95585af57b773d7bc4e04407cda diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index 210c2f437..580b13f1f 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -556,10 +556,8 @@ static int mi_list_ust_event_fields(struct lttng_event_field *fields, int count, if (cur_pid != fields[i].event.pid) { if (pid_element_open) { if (event_element_open) { - /* - * Close the previous fields element - * and the previous event - */ + + /* Close the previous field element and event. */ ret = mi_lttng_close_multi_element(writer, 2); if (ret) { goto end; @@ -748,7 +746,7 @@ static int mi_list_kernel_events(struct lttng_event *events, int count, } for (i = 0; i < count; i++) { - mi_lttng_event(writer, &events[i], 0); + ret = mi_lttng_event(writer, &events[i], 0); if (ret) { goto end; }