From 713bdd260a9b67dcf3a8031bacbe6cf2d220c4da Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 27 Aug 2019 16:49:38 -0400 Subject: [PATCH] Use case-scope error labels handling LTTNG_CONSUMER_ROTATE_CHANNEL MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This cleans-up the error handling of the case handling the LTTNG_CONSUMER_ROTATE_CHANNEL command. This is done in order to allow a follow-up commit to perform some common clean-up operations on error while introducing as few changes as possible. No behaviour change is intended. Signed-off-by: Jérémie Galarneau --- src/common/kernel-consumer/kernel-consumer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c index 196da6633..f9278f75d 100644 --- a/src/common/kernel-consumer/kernel-consumer.c +++ b/src/common/kernel-consumer/kernel-consumer.c @@ -1145,7 +1145,7 @@ end_destroy_channel: ret = consumer_send_status_msg(sock, ret_code); if (ret < 0) { /* Somehow, the session daemon is not responding anymore. */ - goto end_nosignal; + goto error_rotate_channel; } if (channel) { /* Rotate the streams that are ready right now. */ @@ -1155,8 +1155,9 @@ end_destroy_channel: ERR("Rotate ready streams failed"); } } - break; +error_rotate_channel: + goto end_nosignal; } case LTTNG_CONSUMER_INIT: { -- 2.34.1