From d89dd55ea0f25f8b3fafd064fd887759c9a05af0 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 31 Mar 2021 14:59:43 -0400 Subject: [PATCH] Clean-up: lttng: fix -Wshadow error in run_command_string MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We can safely re-use the `ret` variable. Change-Id: Iba98715bf0c2810df7510eeb6a00b17ed56c9f58 Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- src/bin/lttng/commands/track-untrack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/lttng/commands/track-untrack.c b/src/bin/lttng/commands/track-untrack.c index 8a892ef66..e796aa97c 100644 --- a/src/bin/lttng/commands/track-untrack.c +++ b/src/bin/lttng/commands/track-untrack.c @@ -283,7 +283,7 @@ static enum cmd_error_code run_command_string(enum cmd_type cmd_type, strtoul(one_value_str, NULL, 10); if (writer) { - const int ret = mi_lttng_integral_process_attribute_value( + ret = mi_lttng_integral_process_attribute_value( writer, process_attr, (int64_t) one_value_int, true); if (ret) { @@ -353,7 +353,7 @@ static enum cmd_error_code run_command_string(enum cmd_type cmd_type, } else { if (writer) { - const int ret = mi_lttng_string_process_attribute_value( + ret = mi_lttng_string_process_attribute_value( writer, process_attr, one_value_str, true); if (ret) { @@ -469,7 +469,7 @@ static enum cmd_error_code run_command_string(enum cmd_type cmd_type, free(prettified_arg); if (writer) { - int ret = mi_lttng_writer_write_element_bool(writer, + ret = mi_lttng_writer_write_element_bool(writer, mi_lttng_element_success, cmd_ret == CMD_SUCCESS); -- 2.34.1