From: Jérémie Galarneau Date: Tue, 27 Aug 2019 20:49:38 +0000 (-0400) Subject: Use case-scope error labels handling LTTNG_CONSUMER_ROTATE_CHANNEL X-Git-Tag: v2.12.0-rc1~489 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=713bdd260a9b67dcf3a8031bacbe6cf2d220c4da Use case-scope error labels handling LTTNG_CONSUMER_ROTATE_CHANNEL 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 --- 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: {