From 7d52a34aabe980cd737ef00cfbb9ece9b90fd831 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 25 Sep 2020 13:44:20 +0200 Subject: [PATCH] fl_method_response.cc: fix lint failures https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket.appspot.com/8868191791066544960/+/steps/lint_test/0/stdout --- shell/platform/linux/fl_method_response.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/shell/platform/linux/fl_method_response.cc b/shell/platform/linux/fl_method_response.cc index 5bd1d85252e12..d4c760c213572 100644 --- a/shell/platform/linux/fl_method_response.cc +++ b/shell/platform/linux/fl_method_response.cc @@ -97,16 +97,19 @@ G_MODULE_EXPORT FlValue* fl_method_response_get_result(FlMethodResponse* self, FlValue* details = fl_method_error_response_get_details(FL_METHOD_ERROR_RESPONSE(self)); g_autofree gchar* details_text = nullptr; - if (details != nullptr) + if (details != nullptr) { details_text = fl_value_to_string(details); + } g_autoptr(GString) error_message = g_string_new(""); g_string_append_printf(error_message, "Remote code returned error %s", code); - if (message != nullptr) + if (message != nullptr) { g_string_append_printf(error_message, ": %s", message); - if (details_text != nullptr) + } + if (details_text != nullptr) { g_string_append_printf(error_message, " %s", details_text); + } g_set_error_literal(error, FL_METHOD_RESPONSE_ERROR, FL_METHOD_RESPONSE_ERROR_REMOTE_ERROR, error_message->str); @@ -128,8 +131,9 @@ G_MODULE_EXPORT FlMethodSuccessResponse* fl_method_success_response_new( FlMethodSuccessResponse* self = FL_METHOD_SUCCESS_RESPONSE( g_object_new(fl_method_success_response_get_type(), nullptr)); - if (result != nullptr) + if (result != nullptr) { self->result = fl_value_ref(result); + } return self; }